I have a Development platform with magic_quotes_gpc Off, and I can't turn it Off on my Validation server. Both are Ubuntu 11.04 (thought the Validation server is mount under VMWare). The Dev is uses PHP 5.3.6, the Val uses 5.3.2.

I really need to turn it Off on the Validation server. I tried :

  • setting it Off on all lines of all php.ini I met
  • checked in phpInfo that other /etc/php5/apache2/conf.d/*.ini files does not contain magic_quotes config
  • tried a php flag and/or php value in .htaccess
  • even tried ini_set, thought it does'nt work for this PHP version
  • then relaunched the apache server (even using force-reload)

But whatever I try, I still have it On in the phpinfo(), and also have get_magic_quotes_gpc() == 1 when I test it inside the code.

In fact, no modifications of php.ini are taken (tried fopen_url and timezone). But if I rename php.ini to php.pouet, phpinfo() says that no configuration files is used. If I rename it again to php.ini, this file is taken.

This is a Business Symfony 2 application, and using stripslashes everywhere is not an option (too slow and dirty). Escaping is well handled by Doctrine.

I just don't understand what's going on !


Search your filesystem for php.ini. On my messy dev server I have normal PHP installation and Zend server. So I had to edit php.ini in Zend server.

And another thing - restart httpd after you change php.ini. In other case configuration will not update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.