Jump to content

magic quotes


brianlange

Recommended Posts

My old server had magic_quotes_gpc turned on. My new one does not.

Will mysql_real_escape_string solve all the issues that magic_quotes was used for?

My site runs a blogging application and it seems some of the templates which contain a lot of html and css do not insert into the database properly even when using mysql_real_escape_string.

 

Thanks,

 

Brian

Link to comment
https://forums.phpfreaks.com/topic/217498-magic-quotes/
Share on other sites

Here's the query that used to work with magic_quotes turned on. I've tried using mysql_real_escape_string and receive a invalid character error.

 

 

UPDATE blogs SET template='<html> <head> <title><%Title%></title> <link rel='alternate' type='application/rss+xml' title='RSS feed' href='<%MainPageURL%>/rss' /> <meta name="verify-v1" content="4d8h8qpVn/oUpFfHjOVQyuT+2aydTvCxuyjRXf63O6I=" > <style type='text/css'> <!-- body{ background: url(http://www.realtownblogs.com/img/main/main_bg2.png) top left repeat #005298; /* #3b5d8f */ margin: 0px; padding: 0px; vertical-align: top; background-image: url(http://www.realtownblogs.com/img/main/main_bg2.png); font-size: 12px; font-family: verdana, tahoma, helvetica, sans-serif; } p,div,span,b,i,u,a,ul,ol,li,input,select,option,table,tr,td,th,tbody,textarea{ font-family: inherit; font-size: inherit; line-height: 1.5; color: #323232; } h1,h2,h3,h4,h5{ color: #c85500; font-family: trebuchet ms, helvetica, tahoma, sans-serif; font-weight: normal; padding: 0px; } h3,h4,h5{ margin: 0px; } h1,h2{ margin: 0px 0px 16px 0px; } h1{ font-size: 22px; } h2{ font-size: 20px; } h3{ font-size: 15px; } h4{ font-size: 14px; } h5{ font-size: 12px; } .orange{ color: #c85500; } .blue{ color: #00335a; } table#main{ height: 100%; width: 800px; } img#logo{ /*float: left;*/ } #left,#right{ width: 12px; vertical-align: top; } td#left{ background: url(http://www.realtownblogs.com/img/main/v2_body_left.png) top right repeat-y #005298; } td#right{ background: url(http://www.realtownblogs.com/img/main/v2_body_right.png) top left repeat-y #005298; } #body,#footer,#header{ background: #fff; } #body,#footer{ padding: 0px 12px 10px; } #header{ background: url(http://www.realtownblogs.com/img/main/v2_header_background.png) top left repeat-x #fff; height: 77px; padding-right: 8px; vertical-align: top; } #body{ font-size: 12px; padding-top: 8px; background: #fff; vertical-align: top; } #footer{ font-size: 12px; background: #fff; height: 50px; vertical-align: middle; text-align: center; } td{ vertical-align: top; } div.section{ font-size: 12px; padding: 0px 0px 20px 0px; } /* Hyperlinks */ a:link{ color: #0000FF; text-decoration: underline; } a:active{ color: #FF0000; text-decoration: underline; } a:visited{ color: #4000B0; text-decoration: underline; } a:hover{ color: #6060FF; text-decoration: underline; } h1 a:link,h2 a:link,h3 a:link,h4 a:link,h5 a:link{ color: #c85500; } h1 a:active,h2 a:active,h3 a:active,h4 a:active,h5 a:active{ color: #0071c8; } h1 a:visited,h2 a:visited,h3 a:visited,h4 a:visited,h5 a:visited{ color: #8c3b00; } h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover{ color: #ff9141; } --> </style> </head> <body> <table id='main' border='0' cellpadding='0' cellspacing='0' align='center'> <tr> <td id='left' rowspan='3' width='10'><img src='http://www.realtownblogs.com/img/main/transparency.gif' width='10' height='1' border='0'></td> <td> <a href='http://liveinlosgatos.realtownblogs.com'><img src='http://www.realtownblogs.com/uploads/LiveInLosGatos_LiveinLosGatosLarge.png' border='0'></a> </td> <td id='right' rowspan='3' width='10'><img src='http://www.realtownblogs.com/img/main/transparency.gif' width='10' height='1' border='0'></td> </tr> <tr> <td id='body'> <table cellpadding='0' cellspacing='0' align='center'> <tr> <td width='100%' style='padding: 0px 24px 12px 10px; border-right: 1px solid #ddd;' valign='top' NOWRAP> <!-- BEGIN LEFTSIDE --> <IfArchivePage> <h2 style='line-height: 1.2; border-bottom: 0px solid #ddd; margin: 0px; padding: 0px;'>Archives</h2> <%ArchiveInfo%> </IfArchivePage> <Entry> <div style='padding-bottom: 16px;'> <table width='100%' cellpadding='0' cellspacing='0'> <tr><td> <h2 style='line-height: 1.2; border-bottom: 0px solid #ddd; margin: 0px; padding: 0px;'><a class='orange' href='<%EntryURL%>'><%EntryTitle%></a></h2> <div style='padding-left: 0px; font-size: 10px; color: #555;'> <IfDate><strong>Date:</strong> <%EntryDate%><br /></IfDate> <strong>Tags:</strong> <%Tags%></div> <%EntryBody%> </td></tr> <tr><td style='font-size: 12px; padding: 4px 0px 8px 0px;'> <IfCommentsAllowed><IfMainPage><a href='<%EntryURL%>'>Comments</a> (<%EntryCommentCount%>) </IfMainPage><IfCommentPostAllowed><IfMainPage><font class='gray'>::</font></IfMainPage> <a href='<%CommentPostURL%>'>Post A Comment!</a></IfCommentPostAllowed> <IfMainPage><font class='gray'>::</font></IfMainPage></IfCommentsAllowed> <IfMainPage><a href='<%EntryURL%>'>Permanent Link</a></IfMainPage> :: <SendThisLink>Email This Entry</SendThisLink> </td></tr> </table> <br> <IfEntryPage> <IfCommentsAllowed> <Comment> <table cellpadding='0' cellspacing='0' style='margin-left: 30px;'> <tr><td style='width: 54px; padding: 6px 6px 0px 0px;'><img src='<%CommentAuthorAvatar%>' width='40' border='0'></td> <td width='100%'><h3><%CommentTitle%></h3> <div style='border-bottom: 1px solid #ddd; font-size: 10px; color: #555;'> <strong>Posted by:</strong> <%CommentAuthor%> <%CommentAuthorIP%><br /> <strong>Date:</strong> <%CommentDate%></div> <%CommentBody%> <div style='font-size: 10px;'><a href='<%CommentURL%>'>Permanent Link</a> <CommentEdit>Edit</CommentEdit> <CommentDelete>Delete</CommentDelete></div></td></tr> </table> <br> </Comment> </IfCommentsAllowed> </IfEntryPage> </div> </Entry> <div style='background: #eee; padding: 4px; font-size: 10px;'> <strong>Page <%CurrentPage%> of <%TotalPages%></strong> <IfPages> <table cellpadding='0' cellspacing='0' width='100%'> <tr><td><LaterLink>Previous Page</LaterLink> :: <EarlierLink>Next Page</EarlierLink></td></tr> </table> </IfPages> </div> </td> <td width='220' style='padding: 0px 10px;' valign='top' NOWRAP> <!-- BEGIN RIGHTSIDE --> <div class='section'> <center><h2><b>Live in Los Gatos</h2></b></center> <h4>A blog about Los Gatos real estate, homes, houses, condos, townhomes, housing market, neightborhoods, history, events, businesses, parks, schools, photos, issues, and lifestyle.<BR><br> <a href="http://www.popehandy.com/los-gatos-real-estate-and-homes-for-sale.html"><b>Find A Los Gatos Home for Sale By Map - No Registration!</a></b><br><BR> <a href="http://www.popehandy.com/los_gatos_real_estate_market_trends.html"><b>Los Gatos Real Estate Market Data & Trends</b></a><BR><br> <a href="http://www.popehandy.com/buying/buy_los_gatos_real_estate_homes.html">Los Gatos Homebuyer Start Kit</a> <a href="http://www.SiliconValleyHomeValue.com">What's My Home Worth? </a><br> <a href="http://www.realtown.com/LiveInLosGatos/blog/relocating-to-los-gatos">Relocation Info </a></div> Mary Pope-Handy <BR> Realtor, CRS, ABR, E-Pro<br> Sereno Group Real Estate <br> 214 Los Gatos-Saratoga Road, Los Gatos, CA 95030<BR> DRE # 01153805<br> 877 397-5391 toll-free<br><br> <a href='http://www.popehandy.com/contact/index.cfm'>Contact Me</a><br /> <a href="http://www.popehandy.com/profile/index.cfm">About Mary</a><br> <a href="http://www.SanJoseRealEstateLosGatosHomes.com">Silicon Valley Realty blog</a><br> <a href="http://www.Facebook.com/LosGatosRealEstate">Find on Facebook </a><br> <a href="http://www.twitter.com/MaryPopeHandy">Follow on Twitter </a><br> <br> <b>7 Day Los Gatos Market Stats</b><br> <h4>Stats for 95030 Area of LG</color></h4> <iframe style="border:none;padding:none;margin:none;width:160px;height:200px;" scrolling="no" src="http://charts.altosresearch.com/altos/app?pai=50109450&ra=a&q=a&st=CA&c=LOS+GATOS&z=95030&css=http://charts.altosresearch.com/altos/css/crm/default/stattable.css&service=statTable&rt=sf&l=b">Frames not supported</iframe><BR> <iframe style="border:none;padding:none;margin:none;width:160px;height:200px;" scrolling="no" src="http://charts.altosresearch.com/altos/app?pai=50109450&ra=a&q=a&st=CA&c=LOS+GATOS&z=95030&css=http://charts.altosresearch.com/altos/css/crm/default/stattable.css&service=statTable&rt=mf&l=b">Frames not supported</iframe><BR> <BR><h4>Stats for 95032 Area of LG</h4> <iframe style="border:none;padding:none;margin:none;width:160px;height:200px;" scrolling="no" src="http://charts.altosresearch.com/altos/app?pai=50109450&ra=a&q=a&st=CA&c=LOS+GATOS&z=95032&css=http://charts.altosresearch.com/altos/css/crm/default/stattable.css&service=statTable&rt=sf&l=b">Frames not supported</iframe><BR> <iframe style="border:none;padding:none;margin:none;width:160px;height:200px;" scrolling="no" src="http://charts.altosresearch.com/altos/app?pai=50109450&ra=a&q=a&st=CA&c=LOS+GATOS&z=95032&css=http://charts.altosresearch.com/altos/css/crm/default/stattable.css&service=statTable&rt=mf&l=b">Frames not supported</iframe><BR><BR> <BR><B>Use Google to Search within the Live in Los Gatos Blog</b><BR><br> <!-- Google CSE Search Box Begins --> <form action="http://www.google.com/cse" id="searchbox_006954120493373523959:8trwuew7gqy"> <input type="hidden" name="cx" value="006954120493373523959:8trwuew7gqy" /> <input type="text" name="q" size="25" /> <input type="submit" name="sa" value="Search" /> </form> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_006954120493373523959%3A8trwuew7gqy〈=en"></script> <!-- Google CSE Search Box Ends --> <h3>Recent Posts</h3> <RecentEntry> <%RecentEntryTitle%><br /> </RecentEntry> </div> <div class='section'><BR> <h3>Categories</h3> <Categories> <%Categories%> </Categories> </div> <div class='section'> <h3>Favorite Links</h3> <Favlinks> <%Favlinks%> </Favlinks> </div> <BR><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash" width="170px" height="423px" id="InsertWidget_db6b2967-2354-441c-9b3d-6fc83db1ce19" align="middle"><param name="movie" value="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf"/><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="menu" value="false" /><param name="flashvars" value="r=2&appId=db6b2967-2354-441c-9b3d-6fc83db1ce19" /> <embed src="http://widgetserver.com/syndication/flash/wrapper/InsertWidget.swf" name="InsertWidget_db6b2967-2354-441c-9b3d-6fc83db1ce19" width="170px" height="423px" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" align="middle" flashvars="r=2&appId=db6b2967-2354-441c-9b3d-6fc83db1ce19" /></object><BR><BR> <div class='section'> <h3>Links</h3> <a href='<%MainPageURL%>'>My Blog Home</a><br> <a href='<%ProfileURL%>'>My Profile</a><br> <a href='<%MainPageURL%>/tags'>My Tags</a><br> <a href='<%ArchiveURL%>'>My Blog Archives</a><br> <a href='http://www.popehandy.com/contact/index.cfm'>Contact Me</a><br> <a href='http://www.realtownblogs.com' target='_blank'>RealTown Blogs Home</a><br> </div> <div class='section'><BR> <script type="text/javascript" src="http://pub.mybloglog.com/comm2.php?mblID=2007040613033869&c_width=180&c_sn_opt=y&c_rows=10&c_img_size=f&c_heading_text=Recent+Readers&c_color_heading_bg=005A94&c_color_heading=ffffff&c_color_link_bg=E3E3E3&c_color_link=005A94&c_color_bottom_bg=005A94"></script> <a href="http://fusion.google.com/add?feedurl=http://liveinlosgatos.realtownblogs.com/rss"><img src="http://buttons.googlesyndication.com/fusion/add.gif"></a><a href="http://www.bloglines.com/sub/http://liveinlosgatos.realtownblogs.com/rss"><img src="http://www.bloglines.com/images/sub_modern11.gif"></a> <br> <a href="http://add.my.yahoo.com/rss?url=http://liveinlosgatos.realtownblogs.com/rss"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif"></a><a href="http://technorati.com/faves?sub=addfavbtn&add=http://www.realtown.com/liveinlosgatos/blog"><img src="http://static.technorati.com/pix/fave/btn-fave2.png" alt="Add to Technorati Favorites" /></a> <br> </a></noscript> </div> <a href="http://www.realtownblogs.com/uploads/LiveInLosGatos_top-12-2009.gif"> <img src="http://www.realtownblogs.com/uploads/LiveInLosGatos_top-12-2009.gif" alt="Top 12 Women Real Estate Bloggers 2009" border="0"/></a> <br><BR><a href="http://www.realtownblogs.com/uploads/LiveInLosGatos_Sereno_Logo_200.jpg"> <img src="http://www.realtownblogs.com/uploads/LiveInLosGatos_Sereno_Logo_200.jpg" alt="Sereno Group" border="0"/></a> </tr> </td> </tr> </table> </td> </tr> <tr> <td id='footer'>Copyright � 2006 <a href='http://www.internetcrusade.com' target='_blank'>InternetCrusade.com</a><Br><br> Mary Pope-Handy <br> Realtor, CRS, ABR, SRES, E-PRO<br> Sereno Group Real Estate <br> 214 Los Gatos-Saratoga Road, Los Gatos, CA 95030 <br> 877 397-5391 (toll-free)<br> <br> Helping Nice Folks to Buy & Sell Homes in Los Gatos, Saratoga, San Jose and all of Silicon Valley Since 1993<br> <a href="http://www.PopeHandy.com">www.PopeHandy.com</a><br> <a href="http://www.ValleyOfHeartsDelight.com">www.ValleyOfHeartsDelight.com</a><br><br> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-1017074-2"; urchinTracker(); </script> <!--HitTail Code--><script src="http://25484.hittail.com/mlt.js" type="text/javascript"></script><!--End HitTail Code--> <!-- Site Meter --> <script type="text/javascript" src="http://s34.sitemeter.com/js/counter.js?site=s34LiveInLGStats"> </script> <noscript> <a href="http://s34.sitemeter.com/stats.asp?site=s34LiveInLGStats" target="_top"> <img src="http://s34.sitemeter.com/meter.asp?site=s34LiveInLGStats" alt="Site Meter" border="0"/></a> </noscript> <!-- Copyright ©2006 Site Meter --> </tr> </table> </body> </html> <script> var _l = 2711; var _p = 1440; var _f = 1; var _ta = (document.domain).split ("."); var psd = (_ta.length > 1 ? "." + _ta[_ta.length - 2] + "." + _ta[_ta.length - 1] : document.domain); var _cn = "L" + _l + "="; var _call = document.cookie.indexOf (_cn); var _il = 1; var _tl = 0; var _ex; var _rnd = (new Date ()).getTime (); if (_call >= 0) { _pos = document.cookie.substring (_call).indexOf (';'); if (_pos > 0) _val = document.cookie.substring (_call + _cn.length, _call + _pos); else _val = document.cookie.substring (_call + _cn.length); if (_val.indexOf ('.') > 0) { _il = _val.substring (0, _val.indexOf ('.')); _ex = _val.substring (_val.indexOf ('.') + 1); _tl = _ex - (new Date ()).getTime (); } if (_tl <=0) document.cookie = _cn + "; domain=" + psd + "; path=/; expires=" + (new Date ((new Date ()).getTime () - 1000000)).toGMTString () + ";"; } if (_il < _f || _tl <= 0) { var expiry = (new Date((new Date()).getTime()+_p*2*60*1000)).toGMTString(); if (document.cookie.indexOf(_cn) < 0 ) document.cookie=_cn+''+(1)+'.'+((new Date()).getTime()+_p*60*1000)+'; domain='+psd+';path=/;expires='+expiry; else document.cookie=_cn+''+(_il-0+1)+'.'+_ex+';domain='+psd+'; path=/;expires='+expiry; document.write ("<sc" + "ript language='javascript' src='http://adopt.specificclick.net/Custom/bht.jsp?px=" + _l + "&v=1&rnd=" + _rnd + "'>"); document.write ("</sc" + "ript>"); } </script> ' WHERE u_id='24523'

Link to comment
https://forums.phpfreaks.com/topic/217498-magic-quotes/#findComment-1129223
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.