PHP Upgrade?

Web hosting discussion, programming, and shared and dedicated servers.
5 posts Page 1 of 1
by slombardi » Fri Feb 22, 2013 3:06 pm
Hi,

I'm fighting with magic quotes and wondering if there are plans to upgrade PHP to v.6 or some other version that doesn't have magic quotes.

Thanks,
Steve
by rodrigo » Fri Feb 22, 2013 3:27 pm
PHP6 doesn't exist yet.

However, magic quotes were deprecated as of php 5.3, which you can use by following the instructions provided here: https://wiki.sonic.net/wiki/Php5
by slombardi » Sun Feb 24, 2013 8:31 am
Thanks, Rodrigo.

I'm a little confused about how magic quotes is working. I'm using a form that uses string data from a database. Some of the strings have apostrophes (e.g., "Land's End").

The string that $_POST returns from the form is "Land" as if the ' as not been escaped. But if I add a \ to the string in the database (e.g., "Land\'s End") I get "Land\\'s End" as if magic quotes has escaped the added \.

Why does it escape the \ but not the original ' ?
by williamt » Tue Feb 26, 2013 2:11 pm
This might help: http://php.net/manual/en/security.magic ... abling.php

For database stuff I think you want to be using mysql_real_escape_string or perhaps in php 5.x switch to using
MySQLi and use it's escaping.
Sr. Systems Administrator @ sonic.net
by kylebpweb » Wed May 29, 2013 2:46 pm
If you are trying to install Joomla and struggling with .htaccess files and php.ini, take a look at this forum post http://forum.joomla.org/viewtopic.php?t=774050. By commenting it out or making it look for a true value you can bypass the magic quotes barrier.
5 posts Page 1 of 1