PDA

View Full Version : Magic Quotes


webhost
05-24-2003, 02:03 AM
We have always had magic quotes in ther php.ini set has so.



; Magic quotes
magic_quotes_gpc = off ; magic quotes for incoming GET/POST/Cookie data
magic_quotes_runtime= off ; magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_sybase = off ; Use Sybase-style magic quotes (escape ' with '' instead of \')



Tonight a client ask they be turned on like so



; Magic quotes
magic_quotes_gpc = on ; magic quotes for incoming GET/POST/Cookie data
magic_quotes_runtime= on ; magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_sybase = on ; Use Sybase-style magic quotes (escape ' with '' instead of \')



After we turned them on we got database errors like so.



Parse error: parse error, unexpected T_STRING in /home/user/public_html/forums/global.php(305) : eval()'d code on line 1

Parse error: parse error, unexpected '{' in /home/user/public_html/forums/global.php(306) : eval()'d code on line 5

Parse error: parse error, unexpected T_STRING in /home/user/public_html/forums/global.php(307) : eval()'d code on line 11

Parse error: parse error, unexpected T_STRING in /home/user/public_html/forums/global.php(311) : eval()'d code on line 2

Parse error: parse error, unexpected '{' in /home/user/public_html/forums/admin/functions.php(2060) : eval()'d code on line 2

Parse error: parse error, unexpected T_LNUMBER in /home/user/public_html/header.php(50) : eval()'d code on line 4

Parse error: parse error, unexpected T_STRING in /home/user/public_html/header.php(51) : eval()'d code on line 4

Parse error: parse error, unexpected T_LNUMBER in /home/user/public_html/includes/blocks/main.php(55) : eval()'d code on line 1






What is causing this? How can we leave the magic quotes turned on and not have all those errors? Does it to all vbulletin boards.

Link14716
05-24-2003, 12:21 PM
Turn it off in php.ini, but tell them to use a .htaccess to turn it on where they need it.

webhost
05-24-2003, 12:24 PM
magic_quotes_sybase = on ; Use Sybase-style magic quotes (escape ' with '' instead of ')

we just disabled the one line and all works now, thx

webhost
05-25-2003, 10:27 AM
Please read still having problems with it.
http://sitepointforums.com/showthread.php?goto=postid&postid=785274