1 (edited by ROBERTRACKL 05/10/2020 03:16:38 am)

Topic: Cannot create new company due to bugs in sql file

After a fresh install of FA 2.4.8, I get this error when trying to create a new company (admin/create_coy.php):

SQL script execution failed in line 16:
Cannot create new company due to bugs in sql file.

Details how I got here:
** Selected PHP version 5.6
** This is a continuation of topic "Import of Direct Sales Invoice from csv fails" (https://frontaccounting.com/punbb/viewtopic.php?pid=37390#p37390), but the subject is now different. I could no longer use the previous installation; carelessly, I selected PHP version 5.3 instead 5.6 as recommended by apmuthu. After that I could no longer log into my FA installation. Decided to start over.
** Used softaculous at InMotion Hosting to install FA 2.4.8.
** Copied php.ini to the FA root folder. Changed display_errors to On, track_errors to On, and 'error_log = /dev/null' to 'error_log = /logs/FA_errors.log'.
** 2.    Obtained FA24_post_release_fixes_2020-04-07.zip from https://frontaccounting.com/punbb/viewtopic.php?pid=37005&login=1 , post number 4. Uploaded those files into their respective directories in FA after renaming the superseded files by appending .OLD to each file name.
** From inside FA, added the module imports_transactions which should be the latest after the official repository update reported in post #10 of https://frontaccounting.com/punbb/viewtopic.php?pid=37390#p37390 .
** Modified line 220 of import_transactions.php to read:

$_SESSION['Items'] = new import_sales_cart($type, 0, false); $_SESSION['Items']->prep_amount = 0.0E0;

** Entered company setup data for  Company 0
** Tried to create Company 1; got error: SQL script execution failed in line 16: Cannot create new company due to bugs in sql file.

r4

2 (edited by ROBERTRACKL 05/12/2020 07:03:18 pm)

Re: Cannot create new company due to bugs in sql file

The issue here was the use of softaculous for installing Frontaccounting in shared Linux hosting provided by InMotion Hosting. I did an install from SourceForge using frontaccounting-2.4.8.tar.gz which succeeded in creating company 0 as well as company 1. Therefore: do not use softaculous for installing frontaccounting at InMotion Hosting.

r4

Re: Cannot create new company due to bugs in sql file

Compare the sql/<chart>.sql used in InMotion hosting and the one in the sourceforge and inform softaculous / hosting provider of the discrepancy. Possible that the latter did not update their install scripts.

Thanks for reporting it.

Re: Cannot create new company due to bugs in sql file

Hi,

I am a developer at Softaculous.

We apologize for the inconvenience caused to you all.
We at Softaculous are looking into this issue and we should be able to find the cause of the issue.

Once we have any updates on this, we shall definitely post update here as well.
We apologize once again.

Meanwhile if you need any kind of support related to Softaculous, you can directly open a ticket with us :
https://softaculous.deskuss.com

5 (edited by scendraw 06/24/2020 05:20:41 am)

Re: Cannot create new company due to bugs in sql file

I tried to create new company in FrontAccounting 2.4.7 on XAMPP, but failed with the following error message:

SQL script execution failed in line 16:
Cannot create new company due to bugs in sql file.

Saw on https://frontaccounting.com/fawiki/uploads/Help/FrontAccountingCompanyCreation.pdf that DB must pre-exist, how to create the new DB for the new company? I thought it will be automatically created....

What's the solution?

Re: Cannot create new company due to bugs in sql file

Creation of the DB would require additional privileges that the FA's DB user should have atleast for the duration of the install. Use phpMyAdmin / SQLyog / MySQL Workbench or some such MySQL client tool or just operate from the hosting control panel or the SSH terminal if you have access. Otherwise contact your hosting provider.

What platform are you having your FA hosted (Webserver / PHP / MySQL / OS) and their versions and what privileges and skills you have in manipulating them? If you are handicapped in the above skills, then take professional assistance providing a bounty on the Job Offers board.