Annoying Magic Quotes in PHP on Shared hosting
Technology May 16th, 2007In some case, the PHP4 configuration on Linux shared hosting will be default “ON” for magic_quotes_gpc. This cause the single and double quote will be escape with backslash (\). It doesn’t matter if you do addslashes or not.
So the magic_quotes_gpc has to be turned off. Tried the following in the .htaccess file. Put this file under the web root.
<ifModule mod_php4.c>
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
</ifmodule>
If it doesn’t work, them put the following php.ini file in every folders that is root of the script.
magic_quotes_runtime=off
magic_quotes_gpc=off
magic_quotes_sybase=off
Popularity: 3% [?]
Want to work hard and play hard?
Get Inside Story by E-Mail
Subscribe with Your Favorite Reader
Save To Del.icio.us | Digg This | Stumble It
Save To Del.icio.us | Digg This | Stumble It
Leave a Comment
Comment PolicyA comment will be DELETED/MODIFIED if:
- Contains links to splogs or MFA (Made For Adsense) sites
- Contains links to a non-blog related sites
- Contains racists, drugs or illegal statements and stuff like that
- Adds no value to the discussion









