Author Topic: Deprecated: Function eregi() is deprecated in... sef.php (Joomla 1.x error with php 5.3)  (Read 17453 times)

spiros

  • Administrator
  • Hero Member
  • *****
  • Posts: 407559
  • Gender: Male
  • point d’amour
    • spiros.doikas
    • greektranslator
    • doikas
    • 102094522373850556729
    • lavagraph
    • Greek translator CV
Attached the fixed sef.php file. Unzip, rename fixed file to sef.php and upload to joomla's /includes directory. See next post for compatibility with php 5.4.

Deprecated: Function eregi() is deprecated in... sef.php (Joomla 1.x error with php 5.3)

Info about this error and how to fix it:
http://devthought.com/2009/06/09/fix-ereg-is-deprecated-errors-in-php-53
http://takien.com/513/how-to-fix-function-eregi-is-deprecated-in-php-5-3-0.php

Very important:
Notice that I wrapped the pattern (\.([^\.]*$)) around / /, which are RegExp delimiters. If you find yourself escaping / too much (for an URL for example), you might want to use the # delimiter instead.

Another patch for error Parameter 2 to frontpage() expected to be a reference (Joomla 1.x error with php 5.3).

You can also disable error reporting if you have server access, go to your php.ini (global is /usr/local/lib/php.ini) and find the display_errors section and change it to Off. This is a temporary fix though as deprecated functions will cause your site to crash when a future php version will not support them at all and error reporting is crucial so that you know what goes on.
« Last Edit: 22 Dec, 2012, 11:35:46 by spiros »


spiros

  • Administrator
  • Hero Member
  • *****
  • Posts: 407559
  • Gender: Male
  • point d’amour
    • spiros.doikas
    • greektranslator
    • doikas
    • 102094522373850556729
    • lavagraph
    • Greek translator CV