Zen Cart Logo
Forums / General Questions / PHP Deprecated: Directive 'magic_quotes_gpc'

PHP Deprecated: Directive 'magic_quotes_gpc'

Views: 2,807

Results 1 to 4 of 4
7 Mar 2012, 6:01 AM
#1
gorie avatar

gorie

New Zenner

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

PHP Deprecated: Directive 'magic_quotes_gpc'

I noticed my errog_log in my public_html folder is flooding with:

PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

it seems to be added to the error_log several times a minute... and my log file is huge. (this is either related to my upgrade to v1.50,or switching hosts recently, because i didn't have this error in my logs previously)

I contacted my host and they said it's an issue w/ one of my scripts.

any ideas?

7 Mar 2012, 11:48 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: PHP Deprecated: Directive 'magic_quotes_gpc'

Your host is correct, and you need to look at any ADD-ONS installed in your ZC.

What does the error log say? It should list the file(s) that is/are causing the problem(s).

8 Mar 2012, 12:33 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: PHP Deprecated: Directive 'magic_quotes_gpc'

Correct. Zen Cart v1.5.0 doesn't use magic_quotes_gpc for anything.

Since your error message uses the word "directive", I suspect your problem is that your php.ini contains the deprecated directive in it, and needs removing.
Talk to your host for resolution.

8 Mar 2012, 7:52 AM
#4
gorie avatar

gorie

New Zenner

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: PHP Deprecated: Directive 'magic_quotes_gpc'

the error_log doesn't show the files associated with it that i see...
just shows it like:
[07-Mar-2012 03:58:01 UTC] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[07-Mar-2012 03:58:01 UTC] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[07-Mar-2012 03:59:02 UTC] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[07-Mar-2012 03:59:45 UTC] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

i did a search w/ the developers toolkit for magic_quotes_gpc my QBI addon does use magic_quotes_gpc in 2 files (one of the few addons that is not updated for v1.5) but you wouldn't think that is something triggered several times every minute like the error_log is showing since i only import my orders a couple times a day.

and also a file called sqlpatch.php in the admin folder has
Line #664 : if (version_compare(PHP_VERSION, 5.4, '<') && @get_magic_quotes_gpc() > 0) $query_string = stripslashes($query_string);

that looks like the sqlpatch.php came w/ the v1.5 zencart, does that have anything to do with anything?

i'll talk to my host more to see what they say about the php.ini. thanks