Function ereg_replace() is deprecated (v. 2.72) (v. 2.72)

The message "Function ereg_replace() is deprecated" will appear if your server has the ereg_replace function removed, or with the latest version of PHP. This has been corrected in version 2.8x. If you are using an older version, use the instructions below to manually adjust files:

Version 2.62-2.72

Note: Version 2.62 has different files than 2.72. Do NOT use the patch for version 2.62 files.

  1. Open the openinfo.php page in your /enc/ folder, and change the line:

    $Meta_Description = ereg_replace( ' +', ' ', substr(strip_tags(str_replace("
    

    to:

    $Meta_Description = substr(strip_tags(str_replace("
    
  2. Open the following files:

    /enc/meta.php
    /enc/metatitle.php
    /storeadmin/whizzywig/whizzypic.php
    /enc/openinfo.php (v. 2.72 only)
    /storeadmin/sales.php (v. 2.72 only)
  3. In these files, change every instance of:

    ereg_replace("[^[:alnum:].-_,; :]"

    to:

    preg_replace("/[^a-zA-Z0-9.-_,;:ss+]+/"
  4. Change every instance of:

    ereg_replace("[^[:alnum:].-_]"

    to:

    preg_replace("/[^a-zA-Z0-9.-_]+/"
  5. Change every instance of:

    ereg_replace("[^[:alnum:].-_,'; :&]"

    to:

    preg_replace("/[^a-zA-Z0-9.-_,';:&ss+]+/"
  6. Change every instance of:

    ereg_replace("[^[:alnum:].-_,'; :&|]"

    to:

    preg_replace("/[^a-zA-Z0-9.-_,';:|&ss+]+/"
  7. Change every instance of:

    ereg_replace("[^a-zA-Z0-9 ]"

    to:

    preg_replace("/[^a-zA-Z0-9ss+]+/"
  8. Save and reload all pages.

Version 2.55

In version 2.55, different files have this function. Do NOT use the patch for version 2.55 files.

  1. Open the following files:

    /storeadmin/images.php
    /storeadmin/pages.php
    /storeadmin/htmlarea/popups/insert_image.php
    /storeadmin/includes/imgload.php
  2. Change every instance of:

    ereg_replace("[^[:alnum:].]"

    to:

    preg_replace("/[^a-zA-Z0-9.]+/"
  3. Change every instance of:

    ereg_replace("[^[:alnum:].-_]"

    to:

    preg_replace("/[^a-zA-Z0-9.-_]+/"
  4. Change every instance of:

    ereg_replace("[^[:alnum:]-_]"

    to:

    preg_replace("/[^a-zA-Z0-9-_]+/"
  5. Save and reload all pages.