Topic: Upgraded PHP version now can't login

I have updated my website from php7.3 to php8.3 and now I can't login into FrontAccount.  I can't seem to find any steps when upgrading the database.

Re: Upgraded PHP version now can't login

I was able to login if I revert the php database back to 7.3.  If I upgrade to 7.4 everything works, but once I go to 8.0+ the login in screen changes and I can no longer login.  So there must be something that needs to be done.  I am unable to find anything on this.

Re: Upgraded PHP version now can't login

FA officially supports php 8.0. Don't go more than this.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Upgraded PHP version now can't login

Even when I only upgrade to PHP 8.0, the login page on the main screen disappears.  When I downgrade back to 7.4 everything work. 

When I install a new instance of FrontAccounting on a 8.0+ it works.  But I can't seem to restore any data so that will not be the solution.

Re: Upgraded PHP version now can't login

Use the bleeding edge from the GitHub Master as it has many PHP 8.x fixes.

6 (edited by marcusblade 02/07/2024 02:52:59 pm)

Re: Upgraded PHP version now can't login

apmuthu wrote:

Use the bleeding edge from the GitHub Master as it has many PHP 8.x fixes.

So I was able to get the login screen to work by replacing the session.inc with the one on GitHub Master.

But now I have this issue Topic: login repeats with every click  (https://frontaccounting.com/punbb/viewtopic.php?id=9606)

I did this per your other post but still doesn't work. 

effective workaround to use the newer commit only for https and not for http:

Replace hardcoded line 14 of includes/session.inc:

define('SECURE_ONLY', true);
to be

define('SECURE_ONLY', (parse_url($_SERVER['REQUEST_URI'], PHP_URL_SCHEME) == 'https'));
This way newer installs will not break when not using https. The last few times, the released versions seem to have some showstopper for existing users. This will only make existing users especially on legacy systems not to upgrade as that would warrant "consultant costs". FA should herd and retain it's flock as that is where the network wealth of the project lies - bulk satisfied standard users who can upgrade atleast in minor versions safely.

I uploaded  my session.inc file maybe I did something wrong.

Also if I downgrade to php 7.4 this repeat login does not happen, only happens with 8.0, 8.1 and 8.2.  I would stay at 7.4 but my hosting service is upgrading everyone to 8.2 in a few weeks. 

Thanks.

Post's attachments

session.inc 19 kb, 2 downloads since 2024-02-07 

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

Re: Upgraded PHP version now can't login

Time to exit your hosting service and roll your own - a learning curve though.

Re: Upgraded PHP version now can't login

I'm having this same issue and the solution to replace line 14 of includes/session.inc does not work.  HELP!!!