1

I am running suPHP with Apache2 and PHP5.4 on a Debian Wheezy.

I found out that .phps files won't be showed and access will result in a 403 page. The same file with equal chmod/chown/chgrp will be allowed to execute.

My /etc/apache2/mods-enabled/suphp.conf looks like this:

<IfModule mod_suphp.c>
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler application/x-httpd-suphp
    </FilesMatch>
    suPHP_AddHandler application/x-httpd-suphp

    # Added to try to allow phps files
    suPHP_PHPPath /usr/bin/
    AddType application/x-httpd-php-source .phps
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
    suPHP_AddHandler application/x-httpd-php-source

    <Directory />
        suPHP_Engine on
    </Directory>

    .....

The file has permission -rwxr-xr-x and the correct owner/group.

/var/log/suphp/suphp.log does not show any entry.

The error message seems to come directly from Apache itself:

Forbidden

You don't have permission to access /~user/script.phps on this server.

Apache Server at www.example.com Port 80
Daniel Marschall
  • 803
  • 4
  • 9
  • 20
  • does the folder itself have correct permissions, you stated the files do, but the parent folders also need permissions set as well. – RCG Nov 19 '14 at 09:00
  • 1
    Yes, all parent folders have the correct permissions. A php file will run correctly in the directory, a phps not. – Daniel Marschall Nov 19 '14 at 09:12
  • do you have htaccess files readable? add this in your htaccess: AddType application/x-httpd-php .phps – RCG Nov 19 '14 at 09:17

0 Answers0