Hello:
I recently upgraded my server to PHP 7.4.7. I now get errors displayed on my Piwigo pages:
Deprecated
: Invalid characters passed for attempted conversion, these have been ignored in
/var/www/smphoto.com/gallery2/include/template.class.php
on line
215 (also on lines 1024 and 1899)
Reverting to PHP 7.3.19 gets rid of the errors, but other sites on the same machine require PHP 7.4.7.
Piwigo version: 2.10.2
PHP version: 7.4.7
MySQL version: 5.7.30
Piwigo URL: https://smphoto.kulekats.com/gallery2/
Offline
You are not supposed to display errors on production sites. Did you do a search on this topic? It has been covered numerous times.
Offline
I'll forgive the tone and unhelpfulness of this reply because no, I didn't do a search on the topic. Now that I have, I got one hit on "PHP 7.4" and a few unhelpful ones on "deprecated". When I search on "display error messages" I get no hits.
I've been through every page on the Administration UI and haven't found a switch to not display error messages. Until I started getting errors, I didn't think I needed to look for one.
At this point, I guess I file a bug report re PHP 7.4.7. I would have expected the latest production version of Piwigo to work on the latest production version of PHP, but maybe I've just got bitten by version skew.
Offline
It should be in your host's PHP options. Ask your hoster if you're not sure how.
Offline
The forum is full of threads about deprecated because no one searches before asking..
So again, deprecated is not an error but a deprecated message, you can use [extension by Piwigo Team] LocalFiles Editor to add
$conf['show_php_errors'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
to your local/config/config.inc.php
Offline
Thank you erAck - that got rid of the messages. However, I still think Piwigo should be updated to run cleanly with PHP 7.4.7.
Offline
I'd ask about getting a refund...
Not sure how much luck you'll have though as Piwigo does run cleanly with 7.4.7.
PHP doesn't however, as it spits out those deprecated warnings (not errors) - Maybe you can seek a discount from them?
Last edited by jnashpiwigo (2020-07-04 00:35:19)
Offline
Cpanel users don't even need to touch any codes or extensions. It's right in the PHP options.
Offline
Default value for display_error is off in production settings.
[Github] php-src file php.ini-production@L96
jnashpiwigo wrote:
I'd ask about getting a refund...
Not sure how much luck you'll have though as Piwigo does run cleanly with 7.4.7.
PHP doesn't however, as it spits out those deprecated warnings (not errors) - Maybe you can seek a discount from them?
Offline
Zentalquabula wrote:
Default value for display_error is off in production settings.
Shrug, the effective setting entirely depends on what your hosting provider configures in php.ini
Offline