kernelgpf Posted March 7, 2007 Share Posted March 7, 2007 Somehow, after switching hosts, everything that is being taken out of the DB and printed is being "addSlash()"ed, while our previous host automatically "stripslash()"ed everything that was taken out of the DB. Is there anyway to fix this without going through my 50 some odd scripts and "stripslash()"ing everything that's coming out of the DB? Quote Link to comment https://forums.phpfreaks.com/topic/41675-switched-hosting-now-all-db-output-is-addslashed/ Share on other sites More sharing options...
Ninjakreborn Posted March 7, 2007 Share Posted March 7, 2007 That means magic quotes was enabled on the old system and is not on the new. I am not actually sure whether magic quotes run strip slashes as well. It might, but I always do that myself anyway, whether it does or not. What you are going to want to do, is disable the magic quotes. You can "in theory (I have never done it)". Setup a small script above the page that will "automatically" run strip slashes on everything. Basically you could run that on the $row variable before using it, and strip slashes can be performed, for example, when you get it. Well either way you have a long workaround. Paste a page of code your having problems with, and let's see if we can get you a quick fix solution for all the pages. (If you can't just enable magic quotes which would be the easiest). It's always best to "not" use magic quotes, because you run into these kind of problems often when you do. Quote Link to comment https://forums.phpfreaks.com/topic/41675-switched-hosting-now-all-db-output-is-addslashed/#findComment-201943 Share on other sites More sharing options...
pocobueno1388 Posted March 7, 2007 Share Posted March 7, 2007 This has been solved. I am her partner and we no longer need the help ^^ Thank you businessman for your advice, but I went through all 50+ scripts to fix it, hah. Quote Link to comment https://forums.phpfreaks.com/topic/41675-switched-hosting-now-all-db-output-is-addslashed/#findComment-201963 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.