View Full Version : Change to PHP on NINE
SneakyDave
10-02-1999, 12:35 AM
Was there a change when PHP was upgraded on nine regarding the behavior of apostrophe's?
In the past, I didn't have to use stripslashes() before sending output to the page, but now it seems I have to, because backslashes are appearing everywhere.
Just wondering?
Terra
10-02-1999, 01:06 AM
There was a recent configuration change made for PHPLIB-7 compliance...
magic_quotes_gpc boolean
Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash.
At this junction, you have 1 of 2 options:
1) Use stripslashes() where necessary
2) Create an .htaccess file in your www directory (or whatever directory need apply) and include 'magic_quotes_gpc off'
The 'quoting' will be automagical now removing the need to utilize addslashes() for certain types of input...[nbsp][nbsp]Also several other PHP libraries are dependent upon this setting being turned on in the core...
--
Terra
sysAdmin
FutureQuest
<<EDIT: q != g>>
[This message has been edited by ccTech (edited 10-02-99)]
SneakyDave
10-02-1999, 09:07 AM
Yep, adding stripslashes() did it. Thanks for the update.
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.