can not open php pge

jsn

Registered
Hi all

I downloaded Apache 2, and php for serverlogistics and now when I try ro open the test.php page under my name :
http:\\localhost\~jsn\test.php or
http:\\127.0.0.1\~jsn\test.php
it does not work, and shows the following error message:

The requested URL /~jsn/test.php was not found on this server.
Apache/2.0.47 (Unix) DAV/2 PHP/4.3.2 Server at 127.0.0.1 Port 80


But if I open the test.php page under /library/Apache2/htdocs/ it works.

Why?

thanks
jsn
 
it would appear that you do not have ~jsn set up in apache. I'm not sure how to do this. Somebody will come along and tell you.

http:\\127.0.0.1\test.php
should work. give it a try.

david
 
I'm warning you in advance, these httpd.conf containers are for Apache 1 but look at your apache 2 config file and see if it's compatible:

To set up a user folder (~/username), add this directive before the AccessFileName diective:

Code:
<IfModule mod_userdir.c>
    UserDir Sites   
</IfModule>

Now, if you already have a UserDir directive, just change it to whatever you want. This directive will map *all* users' /Users/username/Sites/ folder onto http://127.0.0.1/~username/ (except root). You can also specify any other folder name you want (like the more standard 'htdocs' name).

Now, that specified folder, we'll say it's /Users/jsn/Sites/ must have, at least, the following permissions:

drwx-----x 11 jsn staff 374 Sep 29 00:20 Sites

This means that it's readable, writeable, and executable by you, and executable by everyone. It MUST be 'x' to everyone or apache won't be able to display it. Incidentally, all the parent folders also have to have at least those permissions.

Hope that helps.
 
Back
Top