![]() |
|
changing php version - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: changing php version (/thread-13571.html) |
changing php version - markdalderup - 2021-04-29 I have Zenphoto version 1.5.7 installed running on php 7.1. When I change the php version via cpanel to 7.2 my webpage disappears completely and I get the following errors: server error log: [29-Apr-2021 22:34:32 Europe/Amsterdam] PHP Fatal error: MySQLi Error: ( INSERT INTO zenphoto log {1330:Thu, 29 Apr 2021 20:34:24 GMT} Zenphoto v1.5.7 I thought Zenphoto was compatible with php7.2 so what is causing the error? Greetings Mark changing php version - acrylian - 2021-04-30 Yes, it should be as we develop on PHP 7 for a while although we work on 7.4. Sadly have no idea. The issue is actually a MySQL issue as somehow there is someting inserted incorrectly. Please try 1.5.8RC (support build) changing php version - sbillard - 2021-04-30 So, what is going on here is that the security logger is trying to find the language of the site by instantiation the master user. It does this so that the logs will be in the "owner" native language rather than the language of whoever caused the log entry to happen. Somehow in the process of instantiating the master user it failed to find him in the database. (Not sure how that could happen but it is always possible a bug in PHP caused something not to work correctly.) The instantiation call did not prohibit creating a new user of the same name, so that was tried. But then when the user was added to the database a duplicate entry was detected, so the attempt failed with the error message you show.) These things have not changed in ages, so the only practical assumption is that something in your PHP 7.2 installation caused the problem. PHP 7.2 (and PHP 7.1) are past end of life, so you really should be attempting to go to PHP 7.4 or at least PHP 7.3 which is supported until December this year. If you cannot make these moves, stick with what works. changing php version - markdalderup - 2021-05-08 I didn't want to go any higher than 7.2 because I have no idea of what the current most supported version of PHP is. But after your answers I tried PHP 7.4 and the site stayed up. It doesn't work with PHP 8 apparently because then it disappears again. but now I can install other software that needs a higher version of PHP. That was really the point of my question. Thanks changing php version - acrylian - 2021-05-09 No, it does not work with PHP 8 yet and even 1.5.8 to be released soon will not yet. That will follow with the next update as we don't have time to really test this right now. |