Zen Cart Logo
Forums / General Questions / Function ereg() is deprecated

Function ereg() is deprecated

Views: 1,830

Results 1 to 7 of 7
30 Aug 2012, 5:42 PM
#1
genelee avatar

genelee

New Zenner

Join Date:
Aug 2012
Posts:
4
Plugin Contributions:
0

Function ereg() is deprecated

I have a client who has been using Zen Cart from before I started doing design work for them. I am new to Zen Cart and suspect that the issue they are having is due to using an older version of the software.

When they tried to access the admin page today the following error message came up REPEATEDLY filling multiple pages:

Deprecated: Function ereg() is deprecated in /home/content/a/q/u/aquadine/html/catalog/includes/classes/db/mysql/query_factory.php on line 177

I am not sure what the version is at this point and I'm not sure how I can find out without getting into the admin page.

Any ideas on how to get them back up?

30 Aug 2012, 6:19 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Function ereg() is deprecated

You can see what version of Zencart you're using in Admin - Tools - Server/Version Info.

I'd guess it's 1.38a, so check this: http://www.zen-cart.com/showthread.php?140960-PHP-5-3-Support-for-v1-3-8-a

Please pay particular attention to the very large red text.

30 Aug 2012, 6:19 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Function ereg() is deprecated

Right. They're using a new version of PHP with an old version of Zen Cart that was designed for an old version of PHP.

You'll need to upgrade their Zen Cart version.

Some compatibility info is at the bottom of this wiki page: http://www.zen-cart.com/wiki/index.php/Installation_-_Requirements

30 Aug 2012, 8:59 PM
#4
genelee avatar

genelee

New Zenner

Join Date:
Aug 2012
Posts:
4
Plugin Contributions:
0

Re: Function ereg() is deprecated

Found it and it is 1.38a

Can you point me at a tutorial on upgrading Zen Cart. I looked in the forum section for that but all I see is posts about issues with upgrading not anything about the actual proccess.

31 Aug 2012, 5:45 AM
#6
genelee avatar

genelee

New Zenner

Join Date:
Aug 2012
Posts:
4
Plugin Contributions:
0

Re: Function ereg() is deprecated

OK - so the nightmare continues.

The guy who set this copy of Zen Cart up seems to have not done things in a standard way.

ZC is installed in a directory called catalog but only some of the directories and files in the original 1.38a install seem to be there. One big thing is that there is no "admin" directory at all.

There is another directory present called newcatalog that does have an admin directory but I don't think it is in use because when I check the links on the HTML pages that send someone to ZC all the links refer to the "catalog" directory.

How can ZC work with the entire admin directory missing?

31 Aug 2012, 5:56 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Function ereg() is deprecated

One of the security recommendations is to rename the /admin/ directory to something else hard to guess. You need to look through all of the root directories and identify which one it is (it will have an /includes/ subdirectory among others). When you find it, don't publicize its name or you will lose that bit of security.