Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By littlepeachboy on
Hi Guys
I am a newbie.
I am running Drupal using WAMP.
When I installed Drupal, everything seemed to work except it is giving me an error
# : Function ereg() is deprecated in C:\Program Files\Drupal\www\drupal\includes\file.inc on line 895.
I get a whole bunch of them. I have reinstalled many times with the same result.
I can do most things but I can get to my reports and run status and am unable to run cron.
please help
Comments
Downgrade PHP
Welcome to the Drupal community!
Check and see if you have PHP 5.3 installed. It is not yet supported by Drupal http://drupal.org/requirements so if you have it installed you should uninstall and install PHP 5.2.x. That should take care of the deprecated warnings.
PHP 5.3 installed with wampserver 2.0i
Hi, I am a newbie as well and installed the wampserver 2.0i today and got the same exact problem. I followed your post and fixed the problem by going to the wampserver icon, clicking on "PHP >> Version >> get more" and then downloaded and istalled version 5.2.9 Then I went back to the same place and changed the active version to the 5.2.9, refreshed the page and everything looked correct.
Had the same problem
Hi Wolftmc,
I've had this problem and you helped fix it.
Thank you very much for posting.
It's been such a help coz I'm rubbish at all of this but I'm learning.
Thanks again,
DanielTheNews
thank you!
Drupal newbie here too!
I went back and grabbed the 5.2.9 PHP version and so far seems to be working.
Thanks random and wolf for info! :)
thanks
hi...
i am new to this as well... thanks for the suggestion. the irritating deprecated error msg doesn show any more... but i still see "One or more problems were detected with your Drupal installation. Check the status report for more information". on checking status report, the cron maintainance task has a cross mark and the drupal core update status shows a warning sign. could you help.
regards
ereg error messages mean PHP problems
You helped me, too! Wish it had been easier to find the info! I'm using MAMP, went to preferences, changed the PHP version and voila! All is well.
Thanks
hi Wolftmc
I had same problem and with the steps you told i solved it.
Now i can start to work.
thx
update Drupal to support PHP 5.3.0?
Is is possible to get Drupal updated to support PHP 5.3.0?
I am a total newbies here, It took me a long time to get it working and now it seems that I need to downgrade my PHP which I don't know how to do.
Thanks
php.ini
Adding the php.ini line error_reporting = E_ALL & ~E_DEPRECATED discussed over in 514334 and restarting the web server does seem to provide a work-around.
Fix to get rid of Deprecated Errors
If you just want to fix Drupal and not alter your PHP configuration (you may actually want deprecated errors for other projects) you can edit your Drupal source. See this post for details: http://funkinetics.org/klink/function-ereg-is-deprecated-error-in-drupal-6x-with-php-53/
Another reason to not rely on editing the php.ini file that many folks with share hosted services can't edit it.
Depricated errors
Yes i also got the same depricated errors. so i changed the php version to 5.2.9 and everything is working awesome. thanks for the info guys. your help is really appreciated. this is the error i am facing from past 2 to 3 weeks. now i happen to resolve it because of you people. thanks a lot. keep it up...
DEPRECATED errors
hi hoff it works fine that is really worthfull to me because i have lots of databases and projects in my wamp u save my time.......thankyou very much...
and i have another problem its not related to drupal but it realted to wamp,
with this new version php5.3 iam having errors like undefined index mostly everywhere
but project works fine ,this error makes me totally mad ,the same project works fine in another pc
i dont know why it is ,if u know could u please help me out...............
Thanks! This helped me a lot.
Thanks! This helped me a lot. I run a dev-server on my Ubuntu Desktop with PHP5.3 (and upload to a Debian-stable production server with PHP5.2) and this single line just made my life a whole lot easier, thanks! :)
Here is a link to one version
Here is a link to one version of wamp that still runs php 5.2.9-2. Uninstall the latest version, install this and it will fix the error mentioned at the top.
http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServ...
Untick Display Error option
Solved my problem.
Click Wamp icon (sytem tray)->PHP->PHP Settings->Display Errors (untick)
Solved
Change ereg($mask, $file) to mb_ereg($mask, $file) it should work fine then on the newer php versions as well.
Thanks, this seems to work
Thanks,
this seems to work fine on my devel installation
From http://php.net/manual/en/function.ereg.php:
This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
I was tired of the line
I was tired of the line problems before. I haven't think yo install drupal until now to my website: http://ozeldersturkiye.com
But now i can solve all the line errors. Thank you all and thanks drupal support forum.