Thread Verfasser: JMM
Thread ID: 1821
Thread Info
Es gibt 10 Beiträge zu diesem Thema, und es wurde 1515 Mal angesehen.
 Thema drucken
Errors trying to install fusion702-fix_for_php8
JMM
Hello, folks.

I just downloaded & tried to install fusion702-fix_for_php8. I had the PHP7 (fusion702-fix_for_php7) version installed previously, and now trying to do a clean (full) install of the PHP8 version. My PHP is v8.1.0, and MySQL is v8.0.28. I've created the new database successfully prior to starting the installation.

The first error during installation that I get is:
www.fusionwings.com/phpFusion-v7-php8-step3.png
I am able to fill in the details & click next, but then I get the following error & I am not able to proceed:
www.fusionwings.com/phpFusion-v7-php8-step4.png
I've tried both MySQLi & PDO below the database name, but get the same error.

Does anyone have an idea on what is causing this problem, and how I can fix the problem so I can get fusion702-fix_for_php8 installed successfully?

I would abandon PHP-Fusion v7 & use v9 instead, but the only theme I like & wish to use is Gillette, which I have not found for v9, hence me sticking with v7 Smile.

Thank you in advance, and have yourselves a great day.

Regards & be safe,

John

Zusammengefügt am 24. April 2022 um 03:21:41:
In /locale/English/setup.php, $locale['037'] was missing. I copied over that line from /locale/German/setup.php & translated it into English, and now I don't get that first error at Step 3.

However, I still get that second error at Step 4. I even tried selecting German as the installation language, with the same error at Step 4.

I have been trying to install it on one of my PHP 8.1.0 sites, but when I tried it on a PHP 7.4.0 site I still got the same error at Step 4.

And selecting either MySQLi or PDO gives me that same error at Step 4.

For the database that I created in MySQL 8.0.28 for this installation, I make all my databases utf8_unicode_ci.

Hopefully someone can tell me what might be causing this problem.

Thank you in advance.

Tschüß,

John
Bearbeitet von JMM am 24. April 2022 06:21:41
Information:
PHP Version: 8.1.x •  MySQL Version: 8.0 •  PHP-Fusion: IUP-FIX-PHP8
 
Krelli
Your MySQL user has no permission to change mysql_strict_mode temporarily.

Just open your maincore.php and comment out line 59:

$set_strict_mode = @dbquery("SET sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';");
change it to

//$set_strict_mode = @dbquery("SET sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';");


Then do the same in setup.php on line 226.
Information:
PHP Version: 8.2.x •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: IPv9-DE-MOD
 
JMM
Good day, Sir, thank you for getting back to me.

I commented out those lines you mentioned in both files, and that error has disappeared. However, now I have a different error at the same Step 4:
www.fusionwings.com/phpFusion-v7-php8-step4-b.png
I have been using 8.0.28 - MySQL Community Server - GPL since October 2021 with more than 20 databases without any problems until now, but as these errors with fusion702-fix_for_php8 are related to MySQL, it seems that I have some settings configured incorrectly in my my.ini file that is causing these problems?

Thank you again for helping me resolve these problems, and have yourself a great day.

Regards,
John
Information:
PHP Version: 8.1.x •  MySQL Version: 8.0 •  PHP-Fusion: IUP-FIX-PHP8
 
Krelli
How to change mysql mode:
https://www.phpkb.com/kb/article/how...l-163.html

Edit:
Link seems not to work, just copy this url to your browser:
https://www.phpkb.com/kb/article/how-do-i-disable-strict-mode-in-mysql-163.html
Bearbeitet von Krelli am 24. April 2022 16:06:56
Information:
PHP Version: 8.2.x •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: IPv9-DE-MOD
 
JMM
I found the line, and commented it out, then restarted MySQL:

#   sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

But it is still failing at Step 4 with the same error:
www.fusionwings.com/phpFusion-v7-php8-step4-b.png
When I checked the database after the above error message, I see that the installation got as far as creating the first table (admin):
www.fusionwings.com/phpFusion-v7-php8-step4-mysql.png
www.fusionwings.com/phpFusion-v7-php8-step4-mysql-table-1024.png

Zusammengefügt am 24. April 2022 um 14:09:15:
And when the above fails, accessing my site shows this message:

Zitat

Fatal error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'jmm_cms_phpfusion_panaurora-tech_7_php8.fusionv6172_settings' doesn't exist in D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\db_handlers\pdo_functions_include.php on line 73

Bearbeitet von JMM am 24. April 2022 17:09:15
Information:
PHP Version: 8.1.x •  MySQL Version: 8.0 •  PHP-Fusion: IUP-FIX-PHP8
 
Krelli
It's better to define blank instead of comment it out.
If undefined, your server uses default settings. In earlier versions mysql switched from strict mode off to on by default.
sql-mode = "" should help.
Some older versions of mysql needed underscore instead: sql_mode = "" but i think yours is newer.

Btw: other projects should still run after this change. It makes your db server even more compatible to older systems like PHPF v7
Information:
PHP Version: 8.2.x •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: IPv9-DE-MOD
 
JMM
Perfect. It works like a charm now. And the Validation Code image now works too, which did not in a previous version (maybe fusion702-fix_for_php7).

Thank you for taking the time to upgrade PHP-Fusion 7.02 to work with PHP 8, it is truly appreciated. I have no idea why only people in Germany have kept PHP-Fusion up to date, but I am greatly thankful. As an aside, I am retired now, but the best 4 years of my life were when I lived in West Germany, 1979 bis 1983, mit der Kanadischen Luftwaffe bei Baden-Baden musik.

Have yourself a great week, Krelli.
Information:
PHP Version: 8.1.x •  MySQL Version: 8.0 •  PHP-Fusion: IUP-FIX-PHP8
 
Krelli
You're welcome, best regards from Sri Lanka (no more germany in my case) Wink
Information:
PHP Version: 8.2.x •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: IPv9-DE-MOD
 
JMM
I spoke too soon, without having tested some sections.

When trying to send an email using contact.php, the following error is displayed:

Zitat

Fatal error: Uncaught Error: Call to undefined function each() in D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\class.smtp.php:!391 Stack trace: #0 D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\class.phpmailer.php(848): SMTP->Data() #1 D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\class.phpmailer.php(660): PHPMailer->SmtpSend() #2 D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\class.phpmailer.php(588): PHPMailer->PostSend() #3 D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\sendmail_include.php(70): PHPMailer->Send() #4 D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\contact.php(49): sendemail() #5 {main} thrown in D:\Web\host~PanAurora-Tech.com\CMS\phpfusion\panaurora-tech_v7_php8\includes\class.smtp.php on line 391

My SMTP settings are configured, with SMTP Authentication enabled.
Information:
PHP Version: 8.1.x •  MySQL Version: 8.0 •  PHP-Fusion: IUP-FIX-PHP8
 
Krelli
You've found an unseen Bug. "each" was marked as deprecated in PHP 7.2 and removed in 8.0
In other scripts each was removed and codes was changed to use foreach instead, but in phpmailer it's unfixed until now.
I will update IUP 1.5 to 1.6 and fix it, same step i will fix setup for people like you with enabled db strict mode.
I will try to fix it today and tell you when it's done.

Zusammengefügt am 25. April 2022 um 23:02:05:
I found some more codes to replace for compatibility to PHP 8.1
Will continue tomorrow, its late here and we had 2 power breaks today for about 4 hours.

Zusammengefügt am 29. April 2022 um 18:01:56:
Update v1.6 is available now.
Bearbeitet von Krelli am 29. April 2022 10:31:56
Information:
PHP Version: 8.2.x •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: IPv9-DE-MOD
 
Springe ins Forum: