[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] POSSIBLY SOLVED - IMP set-up, .htaccess file --> magic_quotes_gpc ERROR



"Tim Bolt" <timbolt@xxxxxxxxxxx> wrote:
> Many thanks for your help.  Great list, though still problem not solved.

Tim, I just encountered and solved a problem that may have an identical
cause to the problem you've encountered.  I just installed phpMyAdmin for a
client on a RaQ4 and ran into what may be the same problem.  It wants
magic_quotes_gpc enabled to function properly.  I created an .htaccess file
in the phpMyAdmin directory and confirmed it worked when it supplied an
authentication dialog box, I supplied the correct login and it granted me
access.  FYI, here is what I had in .htaccess:

order allow,deny
allow from all
require user admin
Authname "phpMyAdmin"
Authtype Basic

I then tried to add:

php_flag magic_quotes_gpc on

This resulted in the browser returning an "Internal Server Error" message.
I then checked /var/log/httpd/error by doing:

tail -10 /var/log/htttpd/error

[Tue May 29 06:44:38 2001] [alert] [client xxx.xxx.xxx.xxx]
/home/sites/home/web/phpmyadmin/.htaccess: php_flag not allowed here

I tried some other PHP Apache directives with the same result.  FYI, for
anyone confused when php_flag should be used instead of php_value here's a
simple rule of thumb for PHP4 - use php_flag for anything with boolean
parameters (on/off, 0/1) and php_value for everything else.

Back to the problem...I decided to look at access.conf
(/etc/httpd/conf/access.conf) and discovered that there was no <Directory>
container for /home/sites/home (or several other sites).  I do not know why
that was, but I added one for /home/sites/home, restarted Apache
(/etc/rc.d/init.d/httpd restart) and the php_flag directive was accepted and
magic_quotes_gpc was turned on for the directory containing the .htaccess
file.  Here is what I added:

<Directory /home/sites/home>
AllowOverride All
Options All
</Directory>

Fortunately, I am a pretty experienced Linux server admin b/c this is
definitely not an easy problem to diagnose and correct for non Linux admins
who bought their blue box because it was marketed as a server appliance.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/