Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running an Apache web server with PHP5 as a module (notice: as an Apache module, not CGI!).

In some of my .htaccess files (the one that comes with the gallery3 software, http://gallery.menalto.com/), there are php_value and php_flag statements.

They cause a 500 server error when trying to access files in that folder. So I edited my apache2.conf and added these lines:

<Directory /my/gallery/folder>
  AllowOverride All
</Directory>

Did I do anything wrong? I allow overriding, I run PHP as an Apache module. Why keeps the error.log telling me php_value not allowed here?

share|improve this question
    
If you have access to the main Apache configuration why would be using htaccess files? Just put your directives in the main configuration file. –  Zoredache Sep 15 '11 at 18:26
    
I can, I would, but this isn't the solution. The software comes with the .htaccess configuration (and will overwrite the .htaccess with every update), so this is an upstream thing. I don't want to maintain this with every update. –  tvooo Sep 15 '11 at 19:02

3 Answers 3

up vote 3 down vote accepted

Try to add the "Directory" directive inside the virtualhost rather than in the default apache2.conf. Also if this is in ubuntu/debian, you will need to make the changes in /etc/apache2/sites-available/default , if you are not using any additional virtualhosts.

share|improve this answer

If you are using XAMPP for and bended your DocumentRoot to /Users/USERNAME/Sites there is a second apache configuration file to take care of:

/Applications/XAMPP/etc/extra/httpd-userdir.conf

It defines the AllowOverride Settings for /Users/*/Sites with

AllowOverride FileInfo AuthConfig Limit Indexes

Maybe this hint works for other AMP-stacks too.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.