Magic Quotes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
supes
Forum Newbie
Posts: 3
Joined: Mon Apr 05, 2004 11:51 pm

Magic Quotes

Post by supes »

Hello.

I'm trying to disable Magic Quotes. I'm running a CMS called Mambo, and I've been told that for one of the components (an RSS newsfeed) to function, Magic Quotes needs to be disabled.

I do not have access to the php.ini file on my web host. I've been researching alternate means all day. I've tried creating .htaccess files with about a dozen different combinations of:

Code: Select all

php_value magic_quotes_gpc on
and

Code: Select all

<IfModule mod_php4.c>
    php_flag magic_quotes_gpc off
</IfModule>
but i always get an Internal Server Error.

Maybe the server is not set to Allow Override (whatever that means)?

Anyway, I've also read that there are ways to modify the PHP or insert specific script to disable Magic Quotes. I've tried pasting a few of these into my index.php file but to no avail. The problem is that I don't really understand how it works, and I've seen about a hundred different variations. There seems to be a good one here, but i don't know exactly how to use it. the CMS's index.php page calls on up to two or three other .php files to display the RSS feeds, and i don't know which one to paste the code in, where to paste it, etc.

I may be asking far too much (and if I am I apologize), but is there anyone here who can:

a) walk me through creating the correct .htaccess file i'd need? or
b) let me know what code i'd have to insert to disable Magic Quotes?

This is what I know of the server info:

PHP built On: FreeBSD pro6.abac.com 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #0: Thu i386
Database Version: 4.0.18-log
PHP Version: 4.3.2
Web Server: Apache/1.3.29 (Unix) mod_gzip/1.3.26.1a FrontPage/5.0.2.2634 mod_jk/1.2.5
WebServer to PHP interface: cgi

thanks in advance for any and all ideas... i can also post information on the specific file(s) i'm trying to get this to work with.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

supes
Forum Newbie
Posts: 3
Joined: Mon Apr 05, 2004 11:51 pm

Post by supes »

thanks a lot. php.net doesn't list magic quotes as a changeable setting using ini_set, but i'll give it a try. i may just switch hosts. i've found one that's cheaper and gives me access to php.ini too. thanks again.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

yes it does
supes
Forum Newbie
Posts: 3
Joined: Mon Apr 05, 2004 11:51 pm

Post by supes »

sorry. i must not have looked thoroughly enough. thanks again.
Post Reply