We help IT Professionals succeed at work.

Deprecated: Function ereg() is deprecated in C:\wamp\www\drupal-6.17\includes\file.inc  on line 926 error when installing Drupal

jecommera
jecommera asked
on
Hi,

I get Deprecated: Function ereg() is deprecated in C:\wamp\www\drupal-6.17\includes\file.inc  on line 926 error when installing Drupal.
I have installed WAMP.

Does anyone know how to fix this?
Comment
Watch Question

Commented:
Hi there

you're getting this message because you've installed a version of WAMP that contains PHP 5.3 or higher.
From this version on, using ereg() is not recommended and you should favor pcre functions. Check the PHP reference here:
http://www.php.net/manual/en/book.pcre.php
ioboxWeb Architect
Commented:
you should use php 5.2.11 with drupal...

New version will support php 5.3.


All you have to do is click on the tray icon of wamp and double click php 5.2.11 restart your services and youve done...

Drupal 7 will support php 5.3

Commented:
One quick additional note. Since I guess you won't go for updating Drupal's code, one solution is to actually downgrade to a PHP version prior to 5.3.0

In Drupal's forums there are several messages on this issue, as there also are in  several sites around the web. For example:
http://drupal.org/node/514334
http://drupal.org/node/717866
http://hiveminds.co.uk/2010/04/04/fixing-deprecated-ereg-php-in-drupal/

or check this google results set:
http://www.google.gr/search?sourceid=chrome&ie=UTF-8&q=drupal+php+5.3+ereg

Commented:
Ah, I didn't see iobox's reply since I was typing. Didn't know WAMP is coming with double PHP versions. That's nice and handy apparently :)
ioboxWeb Architect

Commented:
@theremon this is i think the only awsome feature of wamp! you can test your scripts on different versions! really great and fast actually...