In case anyone was interested this is just a quick note to say that the current version of Piwigo does not work with the new PHP 8.4.2.
Actually it renders fine but won't let you log in... gives message that browser is blocking cookies... which it is not.
Going back to PHP 8.3 worked fine.
I searched the forums looking to find out but didn't see anything, so I just tried it myself on my server.
Offline
Hello dev3
I use Piwigo 15.3.0 with PHP version 8.4.1 and everything works even with 35 activated plugins.
Olaf
Offline
I can only suggest that there is a difference between 8.4.1 and 8.4.2 which I doubt. Maybe my ISP has it configured incorrectly? That version is brand new to them.
-Al
Offline
I'm running 2 instances with PHP 8.4.2 and 13 plugins - haven't seen any issues so far.
Piwigo 15.3.0
Operating system: Linux
PHP: 8.4.2 (Show info) [2025-01-17 09:23:30]
MySQL: 11.4.4-MariaDB [2025-01-17 10:23:30]
Graphics Library: ImageMagick ImageMagick 6.9.13-17
Offline
henker wrote:
I'm running 2 instances with PHP 8.4.2 and 13 plugins - haven't seen any issues so far.
Piwigo 15.3.0
Operating system: Linux
PHP: 8.4.2 (Show info) [2025-01-17 09:23:30]
MySQL: 11.4.4-MariaDB [2025-01-17 10:23:30]
Graphics Library: ImageMagick ImageMagick 6.9.13-17
I don't know what the issue is at my end.
As I said, Piwigo renders fine in user mode but it won't let me log in the the admin. backend. The error is from Piwigo identification.php... a. box with red font:
"Cookies are blocked or not supported by your browser. You must enable cookies to log in."
I assume you have logged in.
Do you have any special php.ini or user.ini settings?
-Al
Last edited by dev3 (2025-01-17 16:00:56)
Offline
dev3 wrote:
The error is from Piwigo identification.php... a. box with red font:
"Cookies are blocked or not supported by your browser. You must enable cookies to log in."
I assume you have logged in.
Do you have any special php.ini or user.ini settings?
No particular "special" settings here, and those are almost identical to the previous PHP 8.3 settings.
Are your session settings correct and is the cookie actually set ? In identification.php, I see
if (isset($_POST['login']))
{
if (!isset($_COOKIE[session_name()]))
{
$page['errors'][] = l10n('Cookies are blocked or not supported by your browser. You must enable cookies to connect.');
}
elseOffline
I have the same code as you in the indentification.php module.
How do I check to see if the session name is set (which it obviously is not.)
Offline
I'd go to maintenance-> check PHP info and look at the session.* values, e.g.
session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly On Off session.cookie_lifetime 0 0 session.cookie_path /gallery/ / session.cookie_samesite Strict no value session.cookie_secure On Off ...
Offline
Since I can't log in with php8.4 there is no way to get to 'maintenance' ... unless you mean some file I can see via SFTP or SSH (which is no problem). I'm fairly technical but, of course, I don't know the internals of Piwigo.
Offline
Try to compare the session.* settings of the php.ini settings for PHP 8.4 to the settings of PHP 8.3 - are there any differences ?
Offline
henker wrote:
Try to compare the session.* settings of the php.ini settings for PHP 8.4 to the settings of PHP 8.3 - are there any differences ?
Here are the difference between PHP 8.3 and 8.4 for session * in the php.ini.
8.4 Local Master
session.sid_bits_per_character 4 4
session.sid_length 32 32
session.gc_divisor 100 100
8.3
session.sid_bits_per_character 5 5
session.sid_length 26 26
session.gc_divisor 1000 1000
Does any of this make any sense to you?
EDIT: I tired putting the three 8.3 values (above) in a .user.ini file. I found out that session.sid_bits_per_character and session.sid_length have been Deprecated as of PHP 8.4.0. I tried with just the session.gc_divisor = 1000 but I got the same error message about cookies being blocked when trying to log in. Otherwise the site work fine with PHP8.4. I just can't access the admin panels. There has to be a reason!
Last edited by dev3 (2025-01-18 18:22:11)
Offline
I have the same session*-settings for PHP 8.4 as yours.
And just curious - have you tried another browser and/or incognito mode ?
Offline
henker wrote:
I have the same session*-settings for PHP 8.4 as yours.
And just curious - have you tried another browser and/or incognito mode ?
Yes, I've tried in Safari and in 'private' mode with Brave.
I've asked my ISP but they were no help. They claim that since the latest Piwigo version came out in Oct. and they PHP 8.4 in November that eventually enough Piwigo users will try 8.4 and will get the same result as I get... and the Piwigo team will look into it.
Why your many galleries work on 8.4. is beyond me. Are you using a .user.ini file? If so, what is in it? How about something that might be in an .htaccess file?
Offline
I'm using a global php.ini in 8.4 which is more or less the same as the 8.3 one and some local config settings:
ini_set('display_errors', '0');
ini_set('session.cookie_secure', 1);
ini_set('session.cookie_samesite', 'Strict');
ini_set('session.use_strict_mode', '1');
- this just works on 8.4 as it did on 8.3.
Are these "On" in your environment ?
session.use_cookies On On session.use_only_cookies On On
Offline
Per you suggestions, put these into a .user.ini file and ran with 8.4:
display_errors=0
session.cookie_secure=1
session.cookie_samesite=Strict
session.use_strict_mode=1
I checked phpinfo() and they are set. However, I got the same old "cookies blocked" error.
(Note: these settings also work with 8.3... made no difference... but I normally don't use a .user.ini file with 8.3)
Yes..
session.use_cookies On On
session.use_only_cookies On On
are both set in the php.ini.
There is to be something in my ISP's build of PHP8.4 that is causing this... but what?
Thanks,
-Al
Offline