Hi Guys

I am a newbie.

I am running Drupal using Mowes portable.

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

kurokikaze’s picture

As of PHP 5.3.0, IIRC, ereg extension is deprecated (changelog). Seems like somebody updated your PHP version :)

It must be notice though, not error.

Open includes/file.inc and change ereg to preg_match.

littlepeachboy’s picture

Thanks for your help but it just gave me a new error

warning: preg_match(): Delimiter must not be alphanumeric or backslash in C:\Program Files\Drupal\www\drupal\includes\file.inc on line 895.

mstaton’s picture

I'm also having this problem. Can anyone tell me how to update the file_scan_directory function?

remiblum’s picture

I changed to preg_match and received the same new error..

shunting’s picture

Thanks!

anu580’s picture

i am also facing same error what to do

SocialNicheGuru’s picture

subscribing

http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.

drupalnesia’s picture

Go to line 895 and change to:

elseif ($depth >= $min_depth && preg_match("/$mask/", $file)) {

josesanmartin’s picture