LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Access Forbidden 403 for PHP info page. (https://www.linuxquestions.org/questions/linux-software-2/access-forbidden-403-for-php-info-page-183427/)

Kitara 05-19-2004 04:26 PM

Access Forbidden 403 for PHP info page.
 
Pardon me for my sillyness

I am less than a two week old User for Linux

I will be doing a web server for my school project

I wanted to test the phpinfo page but than when i go to //localhost/test.php
It say

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster

My command is very simple

<html>
<head>
<title>PHP script</title>
</head>

<body>
<?php
phpinfo();
?>
</body>
</html>

Save at var/www/html/test.php


I wonder why is there a Access Forbidden Error
For normal php page it works well with it.
I want to try to test this infopage

I am using Redhat 9.0, Apache, PHP, MySQL, PHPmyADmin
Hope that you guys could help me.
Thank you for reading my help posting
Have a Good Day.

dorian33 05-19-2004 04:33 PM

Apache is running as an user (usually apache). This user needs to have the privileges to read test.php file.

aroop 05-20-2004 07:04 AM

May be you can try setting the permissions of the file test.php to something like 644. Use the command

# chmod 644 test.php

Kitara 05-24-2004 02:49 AM

Quote:

Originally posted by aroop
May be you can try setting the permissions of the file test.php to something like 644. Use the command

# chmod 644 test.php

i type this command and it say Failed arritributes of test.php

i reformat my linux and still the same access forbidden?
i wonder why
i never set anything still access forbidden
sigh

but what privileges
this is my computer i never access anyone else server
i use Http://localhost/test.php

in school computer i can display the page but at home pc i can't
i wonder why
same setting for both school and home pc

Kitara 05-24-2004 03:01 AM

after i type
# chmod /var/www/html/test.php
it can be display

how come like that
why is it so?


Thank you very much guys!
:newbie:

jacky 05-24-2004 03:41 AM

change the attribute by using chmod command
# chmod 644 /var/www/html/test.php


All times are GMT -5. The time now is 11:28 PM.