1. Guarantee Web site malware removal (joomla, drupal, wordpress etc) - don't let your business get down due to virus, malware and blacklist problem.
  2. Recommended Web Hosting to help you doing business online with high performance. : Support ioncube, zend and all other hosting by default.
  3. Get free wordpress website transfer : up to 4 domains Find out more .... Click here to see other user testimonial

At previous post about install drupal in localhost using wamp I got this message :

sucuri long Deprecated: Function ereg() is deprecated when install Drupal

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

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

Quick solution for this case are :

1. Downgrade wamp to previous version

or

2. Edit php source file of drupal.

I prefer to choose second solution since I love to learn new thing icon smile Deprecated: Function ereg() is deprecated when install Drupal

I have tried a few php function like  preg_replace() and mb_ereg()

After test each function I think mb_ereg() is good solution.

Back to the problem I open file :

file.inc

C:\wamp\www\drupal\includes\file.inc


scroll to line 902.

drupal ereg Deprecated: Function ereg() is deprecated when install Drupal

change ereg in line to mb_ereg to make the line transform into :

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

Save the file and retry open http://batikweb.com

This time I got this :

install drupal Deprecated: Function ereg() is deprecated when install Drupal

Nice, I can continue to installation steps icon smile Deprecated: Function ereg() is deprecated when install Drupal

Stay health!

hg Deprecated: Function ereg() is deprecated when install Drupal

Related posts:

  1. [UNKNOWN: 8192] Function ereg() is deprecated when Install Joomla
  2. Step by Step Install Drupal on Wamp : Add Domain
  3. Step by Step Install Drupal on WampServer : Vhost and Clean URL
  4. Install drupal in localhost with xampp
  5. Step by step setting permanent redirect 301 with cpanel

  35 Responses to “Deprecated: Function ereg() is deprecated when install Drupal”

  1. Thanks really helpful

  2. [...] : Vhost and Clean URL November 24th, 2009 No Comments In previous post I have talk about fix ereg() problem that show up when I use wampserver that utlize php [...]

  3. Thanks for this very usefull information !

  4. Excelent!!!!

    It works for drupal 6.14

  5. Thanks a lot! It worked for 6.14

  6. Thanks a lot. I dont have admin access. Older WAMP requires admin access. Your patch as per 2 helped to work on Drupal w/o 902

  7. Worked for me. Thanks

  8. Thanks you very much! its works immediately

  9. Thanks, worked like a charm.

  10. Excellent! Thank you very much!

  11. THANKS!!!

  12. Thanks alot solved my issue aswell :)

  13. You’re the man! :)

  14. Still works in 6.16

  15. Nice work!

  16. OK, funciona al 100%
    Gracias !!!

  17. thank u so much……it worked for me……………..yipeeeeeeeeeeeee

  18. cheers, don’t get why this hasn’t gone into core yet.
    its line 911 on drupal 6.16

  19. good post!! it worked, spent many hours trying to fix it

  20. 3 character – large effect !

    Great job – Thanks a lot.

  21. great job thank you…. you safe my life

  22. Thank you for this effort. You saved me hours of time!!

  23. cheers, don’t get why this hasn’t gone into core yet.
    its line 911 on drupal 6.1

  24. Thank you too. It works in Drupal 6.16 at line 911
    Very helpful. Thank you for sharing.

  25. Ok, you are the man,……..thanks a lot

  26. Thank! It’s work!
    Go to test drupal ;)

  27. Exactly what I need!

  28. Hi man,
    Thanks a lot for this solution. Great Job!

    But I have a question:
    Is the php function (ereg) equivalent to (mb_ereg) ? I mean does it do the same functionality for the include “file” in drupal, or it might result in a code weakness in future use of the function? Sorry, but I was not sure why it wasn’t amended by drupal core upon php 5.3 version! that what confused me not your fix :-)

    Keep it up..

  29. You can refer to manual, IMHO the code don’t show code weakness for future.

  30. Ok, I amended it & works perfectly !! thanks again ;)

  31. Thanks
    i got solution after read from your site thanks once again, i also got solution in eCommerce site where i was get same error. that was also solved.
    you really have new thing to developed and accept challenging error thanks a lot.

  32. Thanks… It works well.

  33. It’s very useful.thx

  34. Thanks , work well

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2011 Hosting Formula Suffusion theme by Sayontan Sinha