Topic: Installation problem

Hi, I am new to the Frontaccounting. I am having a problem when go to install in local server. The error is given below:

Fatal error: Uncaught Error: Call to undefined function user_company() in C:\xampp\htdocs\frontaccounting\includes\errors.inc:87 Stack trace: #0 C:\xampp\htdocs\frontaccounting\install\isession.inc(72): error_handler(8192, 'Methods with th...', 'C:\\xampp\\htdocs...', 19, Array) #1 C:\xampp\htdocs\frontaccounting\install\isession.inc(72): include_once() #2 C:\xampp\htdocs\frontaccounting\install\index.php(18): include('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\frontaccounting\includes\errors.inc on line 87


What will be the solution. Please tell me if you have a solution.

Re: Installation problem

State which version of XAMPP / PHP and OS, FA you are using.

In both FA 2.3.x and 2.4.x, the function user_company() is defined in includes/current_user.inc file.

See if any info in this post solves your issue.

Last edited by apmuthu (05/13/2016 07:07:18 pm)

Re: Installation problem

I am receiving the same error on Windows Installation for FA2.4.1 and XAMP 3.2.2 and PHP Version 7.05 and Windows Version 64-Bit. Any ideas?

I have gone through the post mentioned above and Uncommented following line on session.inc as suggested in the final post.

ini_set('session.save_path', dirname(__FILE__).'/../tmp/');

But still the problem is not resolved.

Re: Installation problem

In the function cache_invalidate in file install/isession.inc, replace:

include_once($path_to_root . "/includes/errors.inc");
// collect all error msgs
set_error_handler('error_handler' /*, errtypes */);

include_once($path_to_root . "/includes/current_user.inc");
include_once($path_to_root . "/includes/lang/language.inc");
include_once($path_to_root . "/includes/ajax.inc");
include_once($path_to_root . "/includes/ui/ui_msgs.inc");
include_once($path_to_root . "/includes/prefs/sysprefs.inc");

with

include_once($path_to_root . "/includes/current_user.inc");
include_once($path_to_root . "/includes/lang/language.inc");
include_once($path_to_root . "/includes/ajax.inc");
include_once($path_to_root . "/includes/ui/ui_msgs.inc");
include_once($path_to_root . "/includes/prefs/sysprefs.inc");

include_once($path_to_root . "/includes/errors.inc");
// collect all error msgs
set_error_handler('error_handler' /*, errtypes */);

Re: Installation problem

That worked for installation but after installation same error appeared when running the application. Then I made the similar changes in includes/session.inc. I changed with below code

wrote:

include_once($path_to_root . "/includes/current_user.inc");
  include_once($path_to_root . "/boxygen.php");
  include_once($path_to_root . "/admin/db/security_db.inc");
  include_once($path_to_root . "/includes/lang/language.php");
  include_once($path_to_root . "/config_db.php");
  include_once($path_to_root . "/includes/ajax.inc");
  include_once($path_to_root . "/includes/ui/ui_msgs.inc");
  include_once($path_to_root . "/includes/prefs/sysprefs.inc");
 
include_once($path_to_root . "/includes/errors.inc");
// colect all error msgs
set_error_handler('error_handler' /*, errtypes */);

It worked but it gives following notice 6 times

wrote:

Notice: Trying to get property of non-object in C:\xampp\htdocs\fa241\includes\errors.inc on line 74


The Same I tried with FA2325 but during installation following error is showing

wrote:

Your PHP has to have MySQL extension enabled.

Re: Installation problem

This error has been sorted out in FA 2.4.1+ in this commit.

Replace your includes/errors.inc with this file.

Using MySQLi with FA 2.3.x has been experimented with in some post in the forum and will not work out of the box.

Re: Installation problem

OK which version of php and xampp will support 2.3.25?

Re: Installation problem

Upto FA 2.3.26+ is supported and tested on XAMPP 1.7.3 and 1.7.7 on WinXP SP3 onwards.
FA has been known to run upto PHP 5.3.x and MySQL upto v5.5.x and Apache 2.2 and 2.4 flawlessly.
FA 2.3.x series uses the MySQL driver instead of your MySQLi driver natively.

Re: Installation problem

apmuthu wrote:

This error has been sorted out in FA 2.4.1+ in this commit.

How can I follow each commit in main FA Repo?

Re: Installation problem

FA 2.4.x Commit links
https://sourceforge.net/p/frontaccounting/git/commit_browser
https://github.com/FrontAccountingERP/FA/commits/master
https://github.com/apmuthu/FA24extensions/commits/master
https://github.com/apmuthu/frontac24/commits/master

Read the wiki.