PHP 4 to 5 Magic Quote Fix?
Posted: Fri Sep 26, 2008 4:35 pm
Hi there, one of my clients has a CMS that was hosted on a php4.3 server
They fired their web developers, hired me, and moved to a new hosting environment that is php5 (I have no control over where they choose to host)
The original developers used magic quotes... Ugg
When the site was moved, I turned magic quotes on because of the HUGE volume of database inserts, updates and reads that were not coded with add/strip slashes.
Now, whenever they update any content, extra single quotes are being added everywhere.
I know the best thing to do is clean up the code with addslashes and stipslashes everywhere, but my client doesn't have the funding for that major of a re-write. (Literally thousands of occurrences need to be updated)
Does anyone have a less time-consuming workaround for this issue?
Thanks!
They fired their web developers, hired me, and moved to a new hosting environment that is php5 (I have no control over where they choose to host)
The original developers used magic quotes... Ugg
When the site was moved, I turned magic quotes on because of the HUGE volume of database inserts, updates and reads that were not coded with add/strip slashes.
Now, whenever they update any content, extra single quotes are being added everywhere.
I know the best thing to do is clean up the code with addslashes and stipslashes everywhere, but my client doesn't have the funding for that major of a re-write. (Literally thousands of occurrences need to be updated)
Does anyone have a less time-consuming workaround for this issue?
Thanks!