10

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?

tvooo
  • 103
  • 1
  • 1
  • 5
  • 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
  • 2
    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

2 Answers2

4

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.

SparX
  • 1,924
  • 12
  • 10
0

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.

Nebel54
  • 103
  • 3