Deprecated: Function ereg() is deprecated in C:\wamp\www\drupal-6.14\includes\file.inc on line 902

Hello,

This message appear because I use latest wamp software that utilize php 5.3.0 where ereg() function is deprecated.

Solutions:

step 1: Goto Folder Drupal\includes

step 2: Select File “file.inc”

step 3:

Goto 902 Line

elseif ($depth >= $min_depth && ereg($mask, $file)) {

Change the function ereg to mb_ereg

elseif ($depth >= $min_depth && mb_ereg($mask, $file)) {

Thnx

Advertisements

10 comments

  1. Hi,

    Thanku for ur post…its really working………………..

  2. Thank You. It works.

  3. Thanks A Lot For this code..
    It really works when installing drupal !!!

  4. Hi! this change doesn’t solve all the problems. There are several drupal modules that continue not working. See that:

    http://drup.org/drupal-and-php-53

    I use calendar and i cannot find any solution yet.

    Bye!

  5. NIce workk!!!!!!!!!!!!!!

  6. tnx it work for me in joomla.

  7. Its really helpful me . Thank you buddy

  8. Djamu · · Reply

    better solution is using the preg_match replacement
    so

    elseif ($depth >= $min_depth && ereg($mask, $file)) {

    becomes

    elseif ($depth >= $min_depth && preg_match("/$mask/", $file)) {

  9. hafidzcyber · · Reply

    thanks guy ..

  10. NELSON · · Reply

    Good work. it real work for me lol

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s