Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / PHP Deprecated: Directive 'magic_quotes_gpc'

PHP Deprecated: Directive 'magic_quotes_gpc'

Started by gorie on 7 Mar 2012, 6:01 AM · Views: 2,809

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).

20 years a Zencart User

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

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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