php files not recognized in browser

Alex Maynard amaynard-vQ8rsROW2HJSpjfjxSPG1fd9D2ou9A/h at public.gmane.org
Fri May 13 18:11:29 UTC 2005


With a lots of help from this list I finally got this working.
Among other things I had to point to the URL not file as suggested
earlier and the final permissions problem was resolved by adding
o=rx permissions to the home directory.

Thank you all for being so generous with your advice (and for being so
patient with an inexperienced newbie). Not only glad to get this working,
but I learned a lot from your suggestions.

Alex



On Fri, 13 May 2005, Lennart Sorensen wrote:

> On Fri, May 13, 2005 at 11:59:10AM -0400, Alex Maynard wrote:
> > Sorry that was a dumb mistake I made, but I get the same error even after
> > correcting it and pointing to:
> >
> > You don't have permission to access /~amaynard/hello.php on this server.
> >
> > Additionally, a 403 Forbidden error was encountered while trying to use an
> > ErrorDocument to handle the request.
> > Apache/2.0.53 (Unix) mod_ssl/2.0.53 OpenSSL/0.9.7d PHP/5.0.4 DAV/2
> > mod_perl/1.999.21 Perl/v5.8.6 Server at localhost Port 80
>
> What are the permissions on public_html in your home dir and on your
> homedir itself?

Thank you. Once I set permissions as below it worked.

drwxr-xr-x    2 amaynard amaynard      112 May 13 09:57 public_html/
drwxr-xr--   39 amaynard amaynard     3672 May 13 13:35 amaynard
drwxr-xr-x   39 amaynard amaynard     3672 May 13 13:39 amaynard/



>
> public_html must be o=rx, and your homedir needs at least o=r as far as
> I remember.
>
> What does this get you:
>
> grep php -r /etc/apache/

Here's what this gives:

grep: warning: /etc/apache/conf: recursive directory loop
/etc/apache/httpd.conf.old:# LoadModule php4_module
/usr/lib/apache/1.3/libphp4.so
/etc/apache/httpd.conf.old:    # distribution - see http://www.php.net)
will typically use:
/etc/apache/httpd.conf.old:    #AddType application/x-httpd-php3 .php3
/etc/apache/httpd.conf.old:    #AddType application/x-httpd-php3-source
.phps
/etc/apache/httpd.conf.old:    #AddType application/x-httpd-php .php
/etc/apache/httpd.conf.old:    #AddType application/x-httpd-php-source
.phps
/etc/apache/httpd.conf.0:# LoadModule php4_module
/usr/lib/apache/1.3/libphp4.so
/etc/apache/httpd.conf.0:    # distribution - see http://www.php.net) will
typically use:
/etc/apache/httpd.conf.0:    #AddType application/x-httpd-php3 .php3
/etc/apache/httpd.conf.0:    #AddType application/x-httpd-php3-source
.phps
/etc/apache/httpd.conf.0:    #AddType application/x-httpd-php .php
/etc/apache/httpd.conf.0:    #AddType application/x-httpd-php-source .phps
/etc/apache/httpd.conf:# LoadModule php4_module
/usr/lib/apache/1.3/libphp4.so
/etc/apache/httpd.conf:    DirectoryIndex index.html index.htm index.shtml
index.cgi index.php
/etc/apache/httpd.conf:    # distribution - see http://www.php.net) will
typically use:
/etc/apache/httpd.conf:    AddType application/x-httpd-php3 .php3
/etc/apache/httpd.conf:    AddType application/x-httpd-php3-source .phps
/etc/apache/httpd.conf:    AddType application/x-httpd-php .php
/etc/apache/httpd.conf:    AddType application/x-httpd-php-source .phps
/etc/apache/httpd.conf:    #AddType application/x-httpd-php .php
/etc/apache/httpd.conf~:# LoadModule php4_module
/usr/lib/apache/1.3/libphp4.so
/etc/apache/httpd.conf~:    # distribution - see http://www.php.net) will
typically use:
/etc/apache/httpd.conf~:    AddType application/x-httpd-php3 .php3
/etc/apache/httpd.conf~:    AddType application/x-httpd-php3-source .phps
/etc/apache/httpd.conf~:    AddType application/x-httpd-php .php
/etc/apache/httpd.conf~:    AddType application/x-httpd-php-source .phps
/etc/apache/httpd.conf~:    #AddType application/x-httpd-php .php
/etc/apache/mime.types:application/x-httpd-php
phtml pht php
/etc/apache/mime.types:application/x-httpd-php-source
phps
/etc/apache/mime.types:application/x-httpd-php3                 php3
/etc/apache/mime.types:application/x-httpd-php3-preprocessed
php3p
/etc/apache/mime.types:application/x-httpd-php4                 php4


>
> Lennart Sorensen
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>




--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list