note 85051 rejected from function.get-magic-quotes-gpc by mgf
| From: | mgf@php.net | Date: | Wed, 20 Aug 2008 09:11:45 +0000 |
| Subject: | note 85051 rejected from function.get-magic-quotes-gpc by mgf | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143671@lists.php.net to get a copy of this message | ||
Note Submitter: cees at connectcase dot nl
----
Following funny behaviour is not a bug and related to magic quotes apparently:
Adding the following to your .htaccess file:
"AddHandler application/x-httpd-php .php"
parses all php files correctly regarding "slash-involved" functions like addslashes,
mysql_real_escape_string etc.:
addslashes("O'Brien") results in "O\'Brien" (as it should be, right?)
Adding the 5 to the PHP handler to your .htaccess file :
"AddHandler application/x-httpd-php5 .htm .html .php"
results in 2 extra slashes.
addslashes("O'Brien") results in "O\\\'Brien".
I have searched the manual, the bugreports AND all over the Internet for an explanation (or at least
someone who experienced the same). No such luck.