Friday, 15 September 2017

php - magic quotes creating problems




I have in shared server magic_quotes_gpc is on. I have tried adding the following code to my .htaccess file.



php_flag magic_quotes_gpc Off


When I use the above line in .htaccess, it throws 500 internal server error.



Even I've tried using ini_set too.




The problem is with CKEEditor. It addslashes the double quotes. And the editor is not woeking properly. I have gone through several answers also but not getting the answer properly.



Please guide me.



PHP Version: 5.3.24


Answer



According to the docs, the magic_quotes_gpc directive is PHP_INI_PERDIR so you should be able to change it.



Whenever you see a "500 Internal Server Error" status code in your live server you should head to the log files and find out the exact reason (rather than guessing). Whatever, I suspect that Apache is complaining that the php_flag directive is unknown. If that's the case, your PHP interpreter is not running as Apache module, thus you cannot use Apache files to change it.




Since your hosting account seems to be pretty old, you'll probably have a custom php.ini file somewhere in your FTP account.


No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...