I recently upgraded a production server to PHP 5.3.6 from a much earlier 5.2.x build and noticed that the process had killed all instances of phpThumb on the server due to the deprecation of the functions ‘eregi’, ‘ereg’, ‘split’ & ‘eregi_replace’.
See:- http://php.net/manual/en/migration53.deprecated.php for a full list of functions deprecated since PHP 5.3.0.
The messages being output by phpThumb are similar to:
Deprecated: Function eregi() is deprecated in /home/test/public_html/phpThumb/phpThumb.php on line 152
The quickest fix is to modify phpThumb.php to suppress the warnings, open the file and change the first few lines from:
error_reporting(E_ALL); ini_set('display_errors', '1');
error_reporting(0); ini_set('display_errors', '0');
IMPORTANT: his will SUPPRESS ALL PHP WARNINGS & ERRORS from phpThumb, so if you get other errors you won’t know much about it.
A BETTER way to remove the errors is to patch phpThumb, all calls to the deprecated functions need replacing.
As an interim measure, until an updated version of phpThumb is released, I have patched a copy of phpThumb 1.7.9 to be PHP 5.3.0+ compatible.
If anyone finds an bugs let me know and I’ll patch them.