Over the last weeks I got many emails from users complaining about problems running their PHP apps on PHP 5.3. Todays example is osCommerce 2.2:
Deprecated: Function eregi() is deprecated in /opt/lampp/htdocs/oscommerce/catalog/admin/includes/classes/language.php on line 87
The answer in this case is quite simple: the eregi() function as the whole ereg extension got deprecated with PHP 5.3 (see http://www.php.net/ChangeLog-5.php#5.3.0
) and all PHP apps using this handy functions now need to update their code to use PCRE functions like preg_match().
To temporary work around this issue you may lower the error reporting level in your php.ini.
error_reporting = E_ALL | E_STRICT
error_reporting = E_ALL & ~E_DEPRECATED
With this setting PHP will prevent warnings about deprecated functions.
But since in PHP 6 the ereg extension will completely removed from PHP this is only a fix of the symptom. And as Frank N. Furter teached us many years ago, it's always better to:
[So I'll] remove the cause, but not the symptom.
And there is nothing to add.