cancel
Showing results for 
Search instead for 
Did you mean: 

magic_quotes_gpc

N/A

magic_quotes_gpc

I think the 'magic_quotes_gpc' php directive was enabled on the old cgi server - please can we have it enabled on the ccgi server? Apparently the default is enabled, so +Net must have switched it off, so characters such as ' " etc in data fields are not automatically escaped like they were before the switch.

Please?

Thanks
Paul
3 REPLIES
Ben_Brown
Grafter
Posts: 2,839
Registered: 13-06-2007

magic_quotes_gpc

I'll need to have a word with the network guys about this, from looking around on the web it's likely that we've turned it off for security reasons.

If this is the case you will need to use the "addslashes()" fuction instead.
N/A

magic_quotes_gpc

This just caused me a bit of headscratching. Not being that clued up on php and mysql I hadn't heard of the addlash() feature and couldn't figure out why it worked on my test machine and not when I uploaded it. I've turned the automatic magic quotes off on my test machine now so that it's the same as f9. Did you find out whether it was turned off for security or will it be turned back on?

Also are there any other deviations from a default php.ini script that we should know about? I don't want to hit a problem like this again because it works fine on my test machine but won't work when uploaded because the options have been changed. If you see what I mean Smiley

Thanks in advance
Ben_Brown
Grafter
Posts: 2,839
Registered: 13-06-2007

magic_quotes_gpc

The gpc_magic_quotes have indeed been disabled for security reasons.

If you have a look at a phpinfo file you can see most of the options that have been set.