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

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

  1. harykris
    February 17, 2010 at 7:20 am | #1

    Hi,

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

  2. gary
    March 18, 2010 at 12:02 pm | #2

    Thank You. It works.

  3. Milap
    March 30, 2010 at 6:02 pm | #3

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

  4. JLJ
    May 10, 2010 at 7:38 am | #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. Rob
    November 10, 2010 at 1:38 pm | #5

    NIce workk!!!!!!!!!!!!!!

  6. November 16, 2010 at 9:50 am | #6

    tnx it work for me in joomla.

  7. January 2, 2011 at 1:23 pm | #7

    Its really helpful me . Thank you buddy

  8. Djamu
    May 19, 2011 at 6:41 pm | #8

    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
    October 28, 2011 at 1:33 am | #9

    thanks guy ..

  1. No trackbacks yet.

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 244 other followers