php files not recognized in browser

psema4 psema4-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri May 13 17:47:02 UTC 2005


On 5/13/05, Alex Maynard <amaynard-vQ8rsROW2HJSpjfjxSPG1fd9D2ou9A/h at public.gmane.org> wrote:
> On Fri, 13 May 2005, William O'Higgins wrote:
> 
> > On Fri, May 13, 2005 at 10:32:26AM -0400, Alex Maynard wrote:
> > >On Fri, 13 May 2005, Chris F.A. Johnson wrote:
> > >
> > >>     But that will not help if the URL is entered in the browser as:
> > >>     /home/amaynard/share/private_html/php/hello.php. The browser will
> > >>     read the file directly and not use the web server.
> > >>
> > >>     The correct way to have Apache interpret the file is to put it in
> > >>     your public_html directory (if that's how you have Apache set up)
> > >>     and call it as: http://localhost/~amaynard/php/hello.php.
[snip]
> 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

You might want to check your httpd.conf file and confirm that
UserDir's are turned on.  Look for the section:

<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    UserDir disable

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, remove the "UserDir disable" line above, and uncomment
    # the following line instead:
    #
    #UserDir public_html

</IfModule>


The forbidden ErrorDocument doesn't sound good though.  You'll want to
make sure that whatever user apache is running as can read the
directory containing apache's error pages.

(You should be able to find the directory by searching httpd.conf for
"Alias /error/")

-- 
- SGE
--
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