The simpler media website CMS
Hi,
my host upgraded MySQL to version 8 and since then the search no longer works. Here are the errors in the error log, any suggestion that can help me with that?
Thanks
mazurki
{2525579:Sun, 17 Mar 2024 18:04:11 GMT}
WARNING: mysqli::query(): (HY000/3685): Illegal argument to a regular expression. in /home/photo698/public_html/zp-core/classes/class-dbmysqli.php on line 72
mysqli->query called from dbMySQLi->query (class-dbmysqli.php [72])
from dbMySQLi->queryFullArray (class-dbmysqli.php [117])
from SearchEngine->searchFieldsAndTags (class-searchengine.php [1107])
from SearchEngine->getSearchImages (class-searchengine.php [1598])
from SearchEngine->getImages (class-searchengine.php [1674])
from SearchEngine->getNumImages (class-searchengine.php [1564])
from getNumImages (template-functions.php [2163])
from include (search.php [28])
from include (index.php [128])
from index.php [79]
Comments
Quick research suggests that MySQL changed thet way how REGEX needs to be written. Have to research if this is a breaking change or if there is some backwards compatibility.
Zenphoto 1.6.2 probably is just not compatible with MySQL 8. We didn't test it as we have no access to it (no host I know over here provides it or MariaDB - which our own host offers - equivalents yet probably because of that).
I had this problem with ZP 1.6.1 then I saw that 1.6.2 was available so decided to upgrade thinking that it might correct the issue... I have submitted the same info to my host that have suggested to try restoring the website as it was on 14/03. Should I go with this or is there something they can do about this REGEX ?
Thank you very much
mazurki
Of course if 1.6.2 is not MySQL 8 compatible no earlier release is as well…
Sorry, I fear you have to wait for an upgrade. We will have to do something with the REGEX query so it might work with MySQL 8 (thet release notes would have noted it). I have to read about changes first. In any case it will be sort of blind fix as I canno test it myself
Alternatively you have to ask the host to re-enable MySQL 5 for the time being.
We meanwhile have added to the requirementts that MySQL 8 is not supported currently.
Tank you so much, I might go back to previous version and wait for an upgrade
Have a nice day
mazurki
Hi;
They reverted MySQL to 5.7 and my search problem is still not resolved. If they can't fix the problem, I'm considering changing hosts and I was wondering if I do a fresh install is there a way to make sure I don't have to rewrite all descriptions of the 12,000 photos in the Gallery. With FileZilla I copied all the files from my public_html (ZP Gallery) to my hard drive. There are surely certain files from the current installation that could replace the files from the new installation, so I don’t have to rewrite al descriptions, if so, could you tell me which ones.
Many thanks for your help
mazurki
You still get the error you posted above or another one? Does this really happen with any search term or just some? Do you have a link to the site perhaps?
If you want to move to another host please read the instructions noted here: https://www.zenphoto.org/news/moving-and-changing-existing-installations/
If the desriptions are not embedded in the meta data (exif) the order of steps is really important.
The Gallery is down this morning, they did not downgrade the mysql, they moved Gallery to another server with v5.7,,, So I guess they completely screwed it up as per what I read in your link? I don't even have access to my admin...
To be continued
Thanks again for your help
mazurki
If they moved the whole server contents at one go without anyone accessing the site it may work.
The crucial point here is that any access - backend or frontend - to the site when db and filesystem don't match will have the filesystem update the database.
We cannot tell that from the outside naturally. Did you try clearing cookies so you can freshly login?
The support build 1.6.3a now has an internal switch so these REGEX queries may work with MySQL 8+. This affects both the search and the favorites handler. Lacking access to MySQL 8+ this is untested therefore.