Forum Moderators: coopster

Message Too Old, No Replies

PHP_AUTH_USER and slashes

behaviour changed in PHP5?

         

dcrombie

2:15 pm on Feb 19, 2005 (gmt 0)



Since upgrading to PHP5 I'm having to 'addslashes' to the $_SERVER["PHP_AUTH_USER"] variable wheras in PHP4 this wasn't necessary.

Anyone know if this is this a) a configuration issue; or b) a 'feature' of PHP5?

hakre

6:44 pm on Feb 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



looks like a configuration issue. checkout magic quotes configuration option.

dcrombie

9:10 pm on Feb 20, 2005 (gmt 0)



magic_quotes_gpc is on and magic_quotes_runtime off - the same settings as older servers running PHP4.
It's only under PHP5 that the $PHP_AUTH_USER variable isn't already escaped.

There are hundreds of PHP scripts running identically on all machines (with the exception of this little 'quirk') so if it's a config issue then it must be pretty obscure...