Installing Drupal · Drupal 6. xvreddymasu-July 9, 2009-
Instaling drupal-6.13, I configured MySQL database and users on that time showing this error. Can any one resolve this problem
Function ereg () is deprecated in c: \ Program Files \ Apache Software Foundation \ apache2.2 \ htdocs \ Drupal \ documdes \ file. INC on line 895
Similar problemstormdruper-July 12,200 9-
Hello,
I am a newbie and just installed wampserver 2.0 on Win XP (containing PHP 5.3.0) and then tried to install Drupal 6.13 and got the same error message above ("deprecated: function ereg () is deprecated in c: \ Wamp \ www \ drupal-6.13 \ registrdes \ file. INC on line 895 "). there seem to be a few other posts about this... someone recommended simply replacing ereg () with preg_match (), but that leads to another se Ries of messages for me: "preg_match () [function. preg-match]: delimiter must not be alphanumeric or backslash in c: \ Wamp \ www \ drupal-6.13 \ sort des \ file. INC on line 895 ". has anyone successfully fixed this problem? Thanks for any help.
Workaround? Faux_codex-July 12,200 9-
I'm a noob with this too, so I can't vouch that it won't break anyse but here's what worked for me (granted, I 've only made the install work a few minutes ago and haven' t tried to configure anything, but the error MSG is gone now)
From the Wamp Tray Icon> php> version> get more...
That shoshould take you to the Wamp site and give you a list of the PHP versions you can download
(I figured the depreciation came in v5.3.0) So I just downloaded the PHP 5.2.9-2 installer...
Shut down Wamp
Install 5.2.9-2 exe
Restart Wamp
Wamp Tray Icon> php> version and then tagged 5.2.9-2
Wamp Tray Icon> restart all services
Again, I'm too much a noob to know if that's "proper" For now (and although I saw a similar "fix" post about replacing with the preg... I still was doing something wrong)
Good luck, I'll post a followup if it appears that doesn't work (just going through a tutorial right now)
F_c
Thanksrpmckee-August 13,200 9-
I degraded the PHP server and I got rid of the errors. I thought the problem had to do with Windows 7. Thanks again.
Login or register to post comments
I agree... stormdruper-July 12,200 9-
I am in agreement with faux_codex's post above. I had the problems abve ("deprecated: function ereg () is deprecated in c: \ Wamp \ www \ drupal-6.13 \ includes \ file. INC on line 895 ") When I installed wampserver 2.0i (containing PHP 5.3.0) but have no such problem when I install wampserver2.0h (containing PHP 5.2.9-2 ). this isn't necessarily a "fix", as it appears that Drupal 6.13 still calla function which is deprecated in PHP 5.3.0. so, for the time being, if you use a PHP version before 5.3.0, the problem shoshould go away.
Fix for deprecated errorsrayray-July 20,200 9-
If you prefer to keep PHP 5.3, you can always suppress the errors. In Drupal'sIncludes/common. inc
, Find line 590. It shoshould be listed:
If ($ errno & (e_all ^ e_notice )){
Replace this line:
If ($ errno & (e_all &~ E_notice &~ E_deprecated )){
This will now always suppress the deprecated error messages. If you have the Developer Tools module, you'll need to make the same changeDevel/devel. Module
Line 460.
Note that every time you update Drupal or the devel module you'll have to manually make this change until they finally patch them to deal properly with PHP 5.3.
Make a change in PHP. iniwebghost-July 26,200 9-
Error_reporting = e_all &~ E_deprecated
All will work
Won't work for everyone... rayray-August 6, 2009-
Login people have hosted accounts where they don't have the option to edit their PHP. ini. also, editing PHP. INI will turn off the deprecated warnings for all PHP code not just Drupal. if your turning them off on your local machine while developing, as soon as you migrate your code to a hosted system the errors will appear again in an environment where you can't mess with PHP's configuration.
In general it's good to get these warnings but suppress them at the application layer -- you want these errors when your writing your own code so you can avoid using those function. come the next round of PHP, The deprecated functions are going bye-bye and if you don't heed the warnings you (or whoever inherits your code) will be stuck.
Drupal will probably resolve them in a few months, but until then I highly recommend patching the broke application and leaving PHP alone.
I used this in my. htaccessadrianb-August 11,200 9-
I used this in my. htaccess file:
Php_value error_reporting 4096
That solved the deprecated warning for my setup (XAMPP on MAC ).
Solved-for now... mr. Perseids-August 24,200 9-
Hi all,
Function ereg () is deprecated in drupal-6.13 \ Program des \ file. INC on line 895
Open the file. INC in a good text editor other than notepad, go to the line number 895 to see the following line. then comment the line and in the next line type the replaced code. this will solve the instalation issues and also most of other issues related to the same issue.
Change
Elseif ($ depth >=$ min_depth & ereg ($ mask, $ file )){
ToElseif ($ depth >=$ min_depth & mb_ereg ($ mask, $ file )){
Mb_ereg fortunatly is notDeprecAtEd
I think its more safe to tochintu84-August 30,200 9-
That seems to work.. I wonder if preg_match wowould work as well ??
Elseif ($ depth >=$ min_depth & preg_match ($ mask, $ file )){
That's it... that worked! ... That's the ticket... t4him-August 25,200 9-
I just installed Wamp (removed XAMPP) and got this error on my first Drupal 6x install. I changed the files. inc file and it works fine. Thanks!