Sunday, December 20, 2009

Drupal Error

Solution of Deprecated: Function ereg() is deprecated in lamp/www/drupal/includes/file.inc on line 902
error..
There are two solution for this..
1. Downgrade lamp to previous version
or
2. Edit php source file of drupal.
I prefer to choose second solution since I love to learn new thing :-)
I have tried a few php function like  preg_replace() and mb_ereg()
After test each function I think mb_ereg() is good solution.

Go to www/drupal/includes/file.inc
open file.inc
Search for elseif ($depth >= $min_depth && ereg($mask, $file)) 
Edit above line by  elseif ($depth >= $min_depth && mb_ereg($mask, $file))
  
Save the file...Open..install drupal..this time u will not face that error..

10 comments:

  1. cool man, you solved my problem which spanned for week, in 2 min, thanks

    ReplyDelete
  2. Thank you for the information. I tried to upgrade the other day without success. I will try again.

    ReplyDelete
  3. hey this is successful..i also tried this on my pc..try it once more...

    ReplyDelete
  4. thank you, so much!! your solution help me.

    ReplyDelete
  5. that was sweet thanks!

    ReplyDelete
  6. Thank you chetan, it works

    ReplyDelete
  7. Thanks... worked like a charm!

    ReplyDelete
  8. fantastic! thanks dude!

    ReplyDelete
  9. Thank u so much...................

    ReplyDelete