Topic: Installation 2.4.18 PHP 8

When trying a new install I get the following error in the install error.log

[26-Jun-2024 12:51:35 UTC] 0::connect_db_mysqli.inc:56:[before upgrade] str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated

PHP ver 8.1.29
Server version: 10.6.18-MariaDB MariaDB Server

Re: Installation 2.4.18 PHP 8

Have a look at this.

It is still better to make NULL into empty strings to support a wide range of PHP versions.

Re: Installation 2.4.18 PHP 8

@apmuthu. It has to be updated. And this forum should be for the developers community.  We need to fix this issues before next php version come up.

@steven,  you are trying to install frontaccounting without table prefix.  That's the reason caused this error.  But this won't interrupt you to use the system. So better you create companies or install frontaccounting with table prefix.

And it will be fixed and updated to next release. @joe fix this and make it on next update.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Installation 2.4.18 PHP 8

Will do! Thanks for detecting this!

Re: Installation 2.4.18 PHP 8

Thanks all for the feedback much appreciated.

Re: Installation 2.4.18 PHP 8

kvvaradha wrote:

@apmuthu. It has to be updated. And this forum should be for the developers community.  We need to fix this issues before next php version come up.

@steven,  you are trying to install frontaccounting without table prefix.  That's the reason caused this error.  But this won't interrupt you to use the system. So better you create companies or install frontaccounting with table prefix.

And it will be fixed and updated to next release. @joe fix this and make it on next update.

Thanks but it did have prefix on.

Re: Installation 2.4.18 PHP 8

This has now been fixed. There were more annoyance with installation etc. on php 8. All should now be fixed and committed to stable repo.

Files involved:
/includes/session.inc
/includes/db/connect_db_mysqli.inc
/access/login.php

Joe

Re: Installation 2.4.18 PHP 8

Thanks Joe did a clean install replaced the above files its still gives the error.

[27-Jun-2024 11:10:05 UTC] 0::connect_db_mysqli.inc:59:[before upgrade] str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated.

Re: Installation 2.4.18 PHP 8

Hello,

It should be impossible. Did you make a flush cache from your browser?

Joe

Re: Installation 2.4.18 PHP 8

Wait a while. You might be right. I think I missed something!

Joe

Re: Installation 2.4.18 PHP 8

@steven

Please download the file /includes/db/connect_db_mysqli.inc file and replace on your test server. I hope it works now.
If it does I will commit it to repo asap.

Joe

Post's attachments

connect_db_mysqli.inc 7.5 kb, 3 downloads since 2024-06-27 

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

Re: Installation 2.4.18 PHP 8

Thanks Joe did a clean install replaced the files now it does not give any error, it just stops after you enter the database / password credentials does not come up with the next screen if you chose Install Additional COAs from FA Repository
No error in the install directory anymore.
I have tested on 2 machines with different clients.

Re: Installation 2.4.18 PHP 8

@steven

I have now tested the install without table prefix on php8.1.3 and tried various options and I cannot find any problems anymore.
The install goes without any errors and working perfectly.

I have committed the last changes to repo. Please do a 'download snapshot' from the repo here:

https://sourceforge.net/p/frontaccounti … ster/tree/

and make a fresh install. Please report back.

Joe

Re: Installation 2.4.18 PHP 8

Thanks Joe I have only tested on cpanel AlmaLinux release 8.10 (Cerulean Leopard) 2 machines and AlmaLinux release 9.4 (Seafoam Ocelot). PHP 8.1.29 - PHP 8.1.29 - PHP 8.2.20
Same result as reported never connects to the database just stops but now without any errors in frontaccounting or apache/http logs.
I will find time to load a new clean vps and test again and get back to you.

Re: Installation 2.4.18 PHP 8

Hi Joe you can close this now I have tested and its all working sorry it took so long, not sure but after a clean install it worked must have been something in the environment that caused the problem on my side.

Re: Installation 2.4.18 PHP 8

Thanks, this item is fixed and closed

Joe