disable magic_quotes()...please?

Status
Not open for further replies.

seven7htangent

New Member
Messages
6
Reaction score
0
Points
0
From what i've discerned via the forums, magic_quotes() is enabled by default in all but PHP level 3.

This is problematic, as i'm using mysql_real_escape_string() (which, as i understand, has become the standard, replacing magic_quotes, as it is more secure against injection attacks), and the combination causes slashes to appear in comments where quotes are double-escaped. Also, links processed through the CMS and inserted into the database in the same manner don't work, because their HREF looks like: http://www.16thmission.com/\"http://www.link.com\" i then have to log in via phpMyAdmin and correct this manually.

When applied for PHP level 3,
my request was denied because i have a newer account, so i'm currently using Intermediate, and of course, the problem persists. Could you please disable magic_quotes, or let me know how else i might go about rectifying this?

Thank you!
 

Russ

<b>Retired *****</b>
Messages
3,168
Reaction score
2
Points
38
Try adding this to your .htaccess file:

php_flag magic_quotes_gpc off

Doing so should effectively disable it.
 

seven7htangent

New Member
Messages
6
Reaction score
0
Points
0
Thanks for the advice, however, when i tried adding
php_flag magic_quotes_gpc off
the server now gives me a 500 internal server error.
I remove it again, and it's back to normal...any suggestions?
Edit:
i've read that this setting needs to be changed in the php.ini file...could that be it?
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Russ, no, that cannot be done - PHP is not running as an Apache module.

Re-apply for PHP v3. In your reason, state that I've told you to and post a link to this thread. It is disabled in PHP v3, and I'll accept it.
 
Last edited:
Status
Not open for further replies.
Top