[SOLVED] Piwigo: Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/html/images/admin/include/themes.class.php on line 697

Hi there.

Sometime ago I have noticed that Piwigo is throwing this error:

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/html/images/admin/include/themes.class.php on line 697

flooding the screen when I was logged in as administrator and messing with the Administration settings (and not only). It caused absolutely nothing beside the flood of error messages. I searched for help and could not find anything. It was weird since I had error_reporting set to false in /etc/php/php.ini. Olgierd helped me by pointing out line 104 in file common.inc.php (@ini_set(‘display_errors’, true);) in the Piwigo installation folder.

In my case the file was located in the:

/var/www/html/images/include/common.inc.php

but general rule of thumb is:

./include/common.inc.php

inside Your Piwigo installation folder.

Use Your favorite text editor (as root) and change the line from:

@ini_set(‘display_errors’, true);

@ini_set(‘display_errors’, false);

and then restart the httpd service.

Few days ago after upgrading from Piwigo 2.6.0 to 2.6.1 error was back and I had to search for the solution in my IM logs which was a major PITA – hence this post. I suppose this will be something I will have to deal with after some (if not each) upgrades but now that I have easy access to a solution and I know what needs to be done I see no problem with that.

Thanks Olgierd.

Cheers.

Andrzej

AndrzejL

"Never meet Your heroes. Most of the time you'll only end up disappointed." White Polak Male Husband Employee Hetero Carnivorous Fugly Geek @$$hole with ADD Catholic “Some men just want to watch the world burn.”

Comments are closed.