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

[cobalt-users] .htaccess file Overrides --> Apache Server Errors



Intro:
Problem in that to run Horde / IMP one needs ?magic_quotes_gpc off? in php.  As I need these for phpMyAdmin, I have to have them on.  To get round this, I want to turn then off just in the folder I run the IMP scripts from.

Unfortunately, creating a .htaccess file with:
php_value magic_quotes_gpc off
or
php_flag magic_quotes_gpc off
leads to an Internal Server Error.  
I have used the .htaccess files uccessful on this and other folders for password protection.  But it will not allow the override of the php.ini setttings.


And Donna Lever again helped with:

>> > AllowOverride AuthConfig Indexes Limit

>> > You'll need at the very least, AuthConfig. If you see AllowOverride
>> > None, that's most likely your problem.

>try this out without the hash mark
>AllowOverride All

This is all fine, again I have 
AllowOverride AuthConfig Indexes Limit
Also tried hashing that in both places it was found and using:
AllowOverride All
(and restoring to original when this did not help matters.)


>  You first
>need to decide what is causing the grief - the .htaccess directives, or the
>PHP commands in them. Try it a bit at a time, don't add any access
>restrictions (if they are needed) to the .htaccess in that dir until you're
>sure the override you need is working. Try using .htaccess on other non-php
>vituals on the server, and see what the result is. If all is OK with them,
>then start investigating the php configuration.

Again, in this and elsewhere, .htaccess work fine.  JUST NOT FOR Overriding Apache or php settings.  (Assume Apache problem, as I cannot override index listing with ?Options -Indexes?)


And, RavenCarrie did what she could with:

>####
>authuserfile /path/to/file/omitted
>php_value include_path .:/home/sites/sitex/directory_of_included_files
>php_value magic_quotes_runtime off
>php_value magic_quotes_gpc off
>Options -Indexes
>####

>Note that in both sites we've got the directory listing turned off;
>that's the Options -Indexes line.

1) Tried that and the ?Options ?Indexes? alone causes an Internal Server Error!


>Here's a few lines from my php.ini file that you might find relevant:
>; Safe Mode
>safe_mode               =       Off
>safe_mode_exec_dir      =
>safe_mode_allowed_env_vars = PHP_

Checked, and mine are identical.
Additionally, since ?Options ?Indexes? causes problems, can we assume it is Apache and not php?


>'php_flag' to make his work. I'm not sure what the difference is
>between our machines (or our php.ini files), we've both got RaQ4's.
>But if he tries 'php_value' his machine tells him to go pound sand.

Tried both after reading about the difference on the php.net site.


>there as well. I've stuck with it ever since. It may have been fixed
>by now, but I *know* that mine works just like it is, so I'm not
>touching it. It looks like:
># PHP4 (backwards compatible with php3)
>AddType application/x-httpd-php .php .php3 .php4 .phtml
>#AddType application/x-httpd-php4 .php3
>AddType application/x-httpd-php4 .php4
>AddType application/x-httpd-php4 .php
>#AddType application/x-httpd-php4-source .php4s
>#AddType application/x-httpd-php4-source .php3s
>#AddType application/x-httpd-php4-source .phps
>
>I leave commented things in my files so that I know what I've changed,
>in case I need to go back later. 'Tis better to uncomment than to
>forget what was there in the first place. ;)


Good policy!
I have:

# PHP4 (backwards compatible with php3)
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php4 .php
#AddType application/x-httpd-php4-source .php4s
#AddType application/x-httpd-php4-source .php3s
#AddType application/x-httpd-php4-source .phps


in my php.ini file, so that should be fine.  Additionally, the problem is before any .php file is called up and all my actual .php files are file.



>The only other thing I can think of is that perhaps your machine isn't
>recognizing the .htaccess files. That was a bug in earlier RaQ4's that
>has since been fixed via update. I can't remember what it looked like
>before the update (and I changed it before I started my "comment
>everything" habit), but here's what it looks like now:
>In access.conf:
># ignore .ht*
><Files ".ht*">
>deny from all
></Files>
Sensible, but my access.conf has that included as well!!!


>I hope *something* from this helps you.. I'm ready to band my head
>onto your desk too. ;)

The moral support?
Seriously, has been educational, but:
?We don?t need no edu-cation.?  
(Showing my age?)

>Maybe you should just ditch IMP?  *grin*

How could you?
Give up?  Give in?

Seriously, if it is an Apache thing, this is a bad sign and a problem I want to solve.

Thanks!
Tim




------------------------------------------------------------
--== Sent via Deja.com ==--
http://www.deja.com/