In PHP 5.3, can “magic_quotes_gpc” be enabled?
I understand that it is deprecated in PHP 5.3, but a PHP script I am installing requires this otherwise it won’t work.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It has to be done at the .ini level. It can’t be done within a script using ini_set(), because by the time the ini_set() is processed, PHP has already completed startup and the various superglobal arrays (POST/GET/REQUEST/etc…) have been set and will NOT be changed.
You can enable the setting per-script using an Apache
<Files>directive, since enabling magic quotes for all PHP scripts is a horrible idea: