Announcement

#16 2024-01-24 13:41:01

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Would love some final validation before I go nuclear on this db

show variables like 'char%';
+--------------------------+----------------------------------+
| Variable_name            | Value                            |
+--------------------------+----------------------------------+
| character_set_client     | utf8mb3                          |
| character_set_connection | utf8mb3                          |
| character_set_database   | latin1                           |
| character_set_filesystem | binary                           |
| character_set_results    | utf8mb3                          |
| character_set_server     | latin1                           |
| character_set_system     | utf8mb3                          |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.002 sec)

Offline

 

#17 2024-01-24 17:04:21

erAck
Only trying to help
2015-09-06
2043

Re: Piwigo 14.1.0 and PHP 8.3 blows up

The 8-bit latin1 for character_set_database and character_set_server is unwanted. It should be utf8mb4 instead. I don't know where it derived that from, only you can know how / in which environment (not set to UTF-8?) you actually set the mysql server up. Probably you didn't adjust any settings, hence the default latin1 is taken. See https://mariadb.com/kb/en/setting-chara … ollations/ and https://mariadb.com/kb/en/setting-chara … t-to-utf-8

However, in the
CREATE DATABASE piwigodb CHARACTER SET utf8;
statement the utf8 is an outdated legacy limited UTF-8 value for MySQL backwards compatibility, not capable to hold the full set of Unicode characters, that nowadays should be utf8mb4 instead. (note the post you followed is 7 years old..).


Running Piwigo at https://erack.net/gallery/

Offline

 

#18 2024-01-24 17:37:36

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Appreciate the pointers. Would that be mb4 as you state or mb3? (I didn't follow that guide when I set it up to be fair, I just freewheeled it, ending up at the wrong destination)

Last edited by John R (2024-01-24 17:41:57)

Offline

 

#19 2024-01-24 21:18:44

erAck
Only trying to help
2015-09-06
2043

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Creating the database is fine with utf8mb4, client and connection and results may still be utf8mb3. Piwigo creates its tables with utf8mb3_general_ci collation.

Here are "my" (the hosting provider's) database character settings that work with Piwigo:

Code:

+--------------------------+---------+
| Variable_name            | Value   |
+--------------------------+---------+
| character_set_client     | utf8mb3 |
| character_set_connection | utf8mb3 |
| character_set_database   | utf8mb4 |
| character_set_filesystem | binary  |
| character_set_results    | utf8mb3 |
| character_set_server     | utf8mb4 |
| character_set_system     | utf8mb3 |
+--------------------------+---------+

Running Piwigo at https://erack.net/gallery/

Offline

 

#20 2024-01-24 21:22:40

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

+--------------------------+----------------------------------+
| Variable_name            | Value                            |
+--------------------------+----------------------------------+
| character_set_client     | utf8mb3                          |
| character_set_connection | utf8mb3                          |
| character_set_database   | utf8mb3                          |
| character_set_filesystem | binary                           |
| character_set_results    | utf8mb3                          |
| character_set_server     | utf8mb3                          |
| character_set_system     | utf8mb3                          |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
+--------------------------+----------------------------------+

Matches, I still get the error PHP Fatal error:  Uncaught mysqli_sql_exception: Incorrect datetime value though...

Offline

 

#21 2024-01-24 21:22:48

OpenPicture
Member
2023-12-19
44

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Hello erAck,

I already mentioned the problem with the data base here Emoji icons used in comments result in the comment being lost about Piwigo's compatibility with utf8mb4.

I even made a new Piwigo installation which installs with a database with utf8mb3_general_ci, that I therefore converted globally to utf8mb4_general_ci.

Here is the setting of my server:

Database server
    •    Server: Localhost via UNIX socket
    •    Server type: MySQL
    •    Server connection: SSL is not being used
    •    Server version: 8.0.35-cll-lve - MySQL Community Server - GPL
    •    Protocol version: 10
    •    User: xxxxxxxxxx@localhost
    •    Server charset: UTF-8 Unicode (utf8mb4)

Web server
    •    cpsrvd 11.114.0.15
    •    Database client version: libmysql - mysqlnd 8.1.25
    •    PHP extension: mysqli  curl  mbstring
    •    PHP version: 8.1.25

I was told by executive on 22.12.2023 that "The devs read the forum. I'm sure if you're patient you'll get a response."

Well, it is now 1/24/2024. I hope I wasn't too eager to ask if there is a solution to get Piwigo to work fully with utf8mb4? ;)

Offline

 

#22 2024-01-25 00:23:35

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Well, thats mighty disappointing...

+--------------------------+----------------------------------+
| Variable_name            | Value                            |
+--------------------------+----------------------------------+
| character_set_client     | utf8mb3                          |
| character_set_connection | utf8mb3                          |
| character_set_database   | utf8mb4                          |
| character_set_filesystem | binary                           |
| character_set_results    | utf8mb3                          |
| character_set_server     | utf8mb4                          |
| character_set_system     | utf8mb3                          |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
+--------------------------+----------------------------------+

[Wed Jan 24 23:16:07.221556 2024] [php:error] [pid 56243] [client 10.0.0.35:51799] PHP Fatal error:  Uncaught mysqli_sql_exception: Incorrect datetime value: '2023-12-30 3:34:29\xe2\x80\xafpm' for column `piwigo`.`piwigo_images`.`date_creation` at row 1 in /usr/local/www/piwigo/include/dblayer/functions_mysqli.inc.php:132\nStack trace:\n#0 /usr/local/www/piwigo/include/dblayer/functions_mysqli.inc.php(132): mysqli->query('\\nUPDATE `piwigo...')\n#1 /usr/local/www/piwigo/include/dblayer/functions_mysqli.inc.php(478): pwg_query('\\nUPDATE `piwigo...')\n#2 /usr/local/www/piwigo/include/ws_functions/pwg.images.php(1891): single_update('piwigo_images', Array, Array)\n#3 /usr/local/www/piwigo/include/ws_core.inc.php(600): ws_images_uploadAsync(Array, Object(PwgServer))\n#4 /usr/local/www/piwigo/include/ws_protocols/rest_handler.php(41): PwgServer->invoke('pwg.images.uplo...', Array)\n#5 /usr/local/www/piwigo/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest(Object(PwgServer))\n#6 /usr/local/www/piwigo/ws.php(22): PwgServer->run()\n#7 {main}\n  thrown in /usr/local/www/piwigo/include/dblayer/functions_mysqli.inc.php on line 132

Offline

 

#23 2024-01-25 15:20:15

erAck
Only trying to help
2015-09-06
2043

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Changing the mysql server default encodings does not (and can't) adjust the already stored bad data. You'll still have to replace the bad data with sane data.


Running Piwigo at https://erack.net/gallery/

Offline

 

#24 2024-01-25 15:30:49

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

Yes, but the error throws up when trying to add new images via the IOS app to a newly created folder, so there is no interaction with what's already there.

Offline

 

#25 2024-01-28 04:20:43

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

It's definitely not me, it's the IOS app that's broke, putting the iPhone to 24hr time and guess what, image loads fine... go figure, now  the issue seems to be viewing the heic photo. I got the clue about the time format from viewing the data in phpmyadmin and I noticed all the creation dates were in 24hr format.

Last edited by John R (2024-01-28 04:33:34)

Offline

 

#26 2024-01-30 09:35:54

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

OK, got most things resolved now, ext_imagick for the win. Only outstanding item is the original datetime format issue with the IOS app with the phone in 12hr format.

Offline

 

#27 2024-01-30 16:39:05

erAck
Only trying to help
2015-09-06
2043

Re: Piwigo 14.1.0 and PHP 8.3 blows up

I'd guess the am/pm string is simply not an acceptable datetime database value, specifically with the NNBSP character, but maybe even with an ordinary space character instead. Or maybe it would work if the database's (server) locale was en_US.UTF-8 (or at least for LC_TIME), but I'd not bet on it.


Running Piwigo at https://erack.net/gallery/

Offline

 

#28 2024-01-30 18:49:23

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

I would imagine mariadb understands it if it knows about it. This would suggest it's possible with %r and %p but it needs to be accounted for...

https://mariadb.com/kb/en/date_format/

Offline

 

#29 2024-01-30 18:52:42

John R
Member
2023-04-17
25

Re: Piwigo 14.1.0 and PHP 8.3 blows up

[(none)]> show global variables like 'lc_time_names';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| lc_time_names | en_GB |
+---------------+-------+

Offline

 

#30 2024-01-30 19:52:32

raupie
Member
2023-07-11
12

Re: Piwigo 14.1.0 and PHP 8.3 blows up

I'm curious if the original poster is using the VideoJS plugin.

I'm getting the same error when attempting to generate thumbnails for .mp4 files I received from family over messenger. Also security camera video recordings seem to trigger this error.

I suspect that metadata is missing from the file. I believe FB strips that sort of metadata for example if you attempt to download images/videos from messenger for example.

I was hoping this plugin would take that missing data into consideration and continue to generate the thumbnail without the metadata present.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact