Topic: orphaned company databases

I inadvertently updated a computer to PHP 7 and the 2.4 Frontaccounting update failed. I want to access the data from another computer still running PHP 5.

I though I'd create a new company and update the data from a backup.

I went to create a new company by logging in as admin on the only company on this installation, but Create new company is greyed out/inaccessible.

Is there a fix?

Re: orphaned company databases

You can create a new company only from the default company (generally 0) in any installation. Make sure you obtain the entire sql backup from your PHP 7 upgraded server (preferably pre-upgrade state) and the stanza pertaining to the company in the config_db.php file there as that would be useful to restore in the PHP 5 server instance.

Re: orphaned company databases

I am logged in as admin, roleid = 3, to the default company with table prefix of 0. A number of menu items including Create/Update companies are not available.

Re: orphaned company databases

It is possible that the Company 0 is not the default company.
It is possible that the company prefix of '0_' may be in non default company as well.
Default company is based on $def_coy variable's value in config_db.php(attached example) file.

The example attached has the default company as 0 and the 0th element of the $db_connections array has it's tb_pref element as "0_" but this may not always be the case.

Post's attachments

DefComanyNo.png 13.7 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: orphaned company databases

My config_db.php begins as follows:
$def_coy = 0;

$tb_pref_counter = 4;

$db_connections = array (
  0 =>
  array (
    'name' =>

yet logging into this company as admin with role_id=3 has the administrative menu items inaccessible (Create/Update companies, etc.)

Can the databases be reconfigured manually?

Re: orphaned company databases

I started over again with a clean database and installed 2.3.26, administrative menu enabled. Restored data from backup,  administrative menu disabled. Started clean again but this time removed security_roles and users tables from restore. All OK; copied 2.4.1 files in, and all went as advertised.

Re: orphaned company databases

If there were some extensions installed earlier, their tables need to be considered as well. Assets was an extension in FA v2.3.x but is now it is an integral part of FA in v2.4.x.