php files not recognized in browser

Alex Maynard amaynard-vQ8rsROW2HJSpjfjxSPG1fd9D2ou9A/h at public.gmane.org
Fri May 13 15:59:10 UTC 2005


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.
> >
> >
> >Thank you. I tried this. At least I get a different error now. I'm not
> >sure if I'm doing this correctly. I used mkdir to add a
> >public_html directory in home user directory (do I need to do something
> >fancier or put this somewhere else?) The permissions are:
> >drwxr-xr-x    2 amaynard amaynard      112 May 13 09:57 public_html/
> >
> >Then I copied the php file into this directory, with permissions:
> >-rw-rw-r--    1 amaynard amaynard      111 May 12 19:28 hello.php
> >
> >The I pointed the browser to  http://localhost/~amaynard/php/hello.php
> >but got a permission error this time (different from what I had before):
>
> You didn't create a php directory, so there's nothing there - try this:
> http://localhost/~amaynard/hello.php

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

>
> Also, you are using Apache2, so look in /etc/apache2 for you httpd.conf
> and modules.conf.

It doesn't look like I have an apache2 directory in /etc or anywhere
else.

root at libranet:/etc# locate apache2
/usr/share/doc/HOWTO/en-html/Linux+IPv6-HOWTO/hints-daemons-apache2.html

Thanks very much.

Alex


> --
>
> yours,
>
> William
>
>



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