php files not recognized in browser

William O'Higgins william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Fri May 13 14:31:17 UTC 2005


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

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

yours,

William

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://gtalug.org/pipermail/legacy/attachments/20050513/8f246659/attachment.sig>


More information about the Legacy mailing list