cancel
Showing results for 
Search instead for 
Did you mean: 

[PAYH] PHP5.2 and magic_quotes

decomplexity
Rising Star
Posts: 493
Thanks: 26
Registered: ‎30-07-2007

[PAYH] PHP5.2 and magic_quotes

I have just moved the PHP back-end of a forms-based application from CGI to PAYH (the front end is untouched apart from using a different 'action' URL in the <form> tag).
The front-end form uses POST, and the receiving PHP uses $_POST to receive it.   
If a single quote ( ' ) is entered anywhere within the form text, it now appears in the backend as escaped quote ( \' ), whereas in CGI it was unaltered.
Has the default for magic_quotes_gpc in the PAYH environment been switched to 'enabled'?
Zen from May 17. PN Business account from 2004 - 2017
2 REPLIES 2
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: [PAYH] PHP5.2 and magic_quotes

Yes, magic_quotes_gpc is on. It shouldn't be. Stick    php_flag magic_quotes_gpc Off      in your .htaccess and it won't be.
Gabe
decomplexity
Rising Star
Posts: 493
Thanks: 26
Registered: ‎30-07-2007

Re: [PAYH] PHP5.2 and magic_quotes

Thanks Gabe. Your absolutely right: having magic_quotes enabled is daft.
And the entire freature is removed in PHP6 anyway so PN are storing up trouble if they leave it on...
Zen from May 17. PN Business account from 2004 - 2017