My hosting server recently upgraded my PHP version and I am now getting these deprecated errors and I have no idea how to fix. I've read online to downgrade my PHP verion however my host will no longer allow me to do so. I've also read these is a manual way to suppress these errors however I do not see anything specific related to my problem. Can anyone help me with this?

All the errors are the same

/file.inc on line 895. : Function ereg() is deprecated in

I only see these on the admin side of my website. Help please?

Comments

jaypan’s picture

You need to adjust any calls to ereg() with preg_match(). You will need to alter the regex accordingly. Drupal core does not contain any calls to ereg() anymore (because it has been deprecated), so you can start by upgrading your Drupal core, and see if that helps. If it doesn't, you will have to figure out which modules and themes you are using that are using ereg() and change them accordingly.

Edit: The error message you posted refers to file.inc, which is likely part of Drupal core. So you should upgrade to the most recent release of your current version of Drupal.

Contact me to contract me for D7 -> D10/11 migrations.

reb00t’s picture

OK thanks