Deprecated: Function ereg() is deprecated Error
Hi
I have just changed hosts and am getting the:
Deprecated: Function ereg() is deprecated on the 5-6 ZC installs I have.
I understand it is because my host is running PHP 5.3 and I need to upgrade (currently an old 1.3.7 install).
My question is there an EASY way to upgrade to the latest version or must I go through incremental updayes etc and manually update files etc to 1.3.8 then 1.3.9 then 1.50 etc
Ernie
Re: Deprecated: Function ereg() is deprecated Error
As far as upgrading the PHP files, you can go directly to the 1.5.0 files, by FOLLOWING THE DETAILED UPGRADE PROCEDURE. And NOT by blindly uploading new files over the old ones.
As far as upgrading your site's database, when you run zc_install it will show you that you need to do the database steps for 1.3.8 and 1.3.9 and 1.5.0 and will give you checkboxes to do those steps.
Re: Deprecated: Function ereg() is deprecated Error
Will v1.5 stop the error I am getting?
"PHP Deprecated: Function ereg() is deprecated in"
I searched the internet and couldnt find the answer so as a last resort here I am.
Re: Deprecated: Function ereg() is deprecated Error
You didn't post the entire error message, so we can't possibly know for sure whether the error message you're getting actually has anything to do with any Zen Cart code in the first place.
But, as far as v1.5.0 code goes, the official original Zen Cart v1.5.0 code doesn't use any "ereg" functions. It'll be up to you to determine whether your custom code has used the old deprecated functions anywhere, and in those cases, you'll need to fix the code to use contemporary methods of accomplishing the same thing.
Re: Deprecated: Function ereg() is deprecated Error
Well as it was an error that appeared in the ZC error log I assumed it was from a ZC file.
Here is the part that I failed to include in my post.
includes/classes/db/mysql/query_factory.php on line 177
Re: Deprecated: Function ereg() is deprecated Error
The logs will show errors that are triggered by addons, too. Not just errors happening by core files.
And, yes, upgrading to a version of Zen Cart (and corresponding addons) that is compatible with the PHP version you're using, will get rid of the error message pertaining to features deprecated in your version of PHP.
Re: Deprecated: Function ereg() is deprecated Error
OK great. I will upgrade to 1.5. In the meantime I found your temporary fix offered here in the form of a zip file. I uploaded the files and site was back immediately. Thanks