LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2004, 04:26 PM   #1
Kitara
LQ Newbie
 
Registered: May 2004
Location: Singapore
Posts: 5

Rep: Reputation: 0
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.
 
Old 05-19-2004, 04:33 PM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
Apache is running as an user (usually apache). This user needs to have the privileges to read test.php file.
 
Old 05-20-2004, 07:04 AM   #3
aroop
Member
 
Registered: May 2004
Location: Kolkata, India
Distribution: Red Hat 9
Posts: 50

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

# chmod 644 test.php
 
Old 05-24-2004, 02:49 AM   #4
Kitara
LQ Newbie
 
Registered: May 2004
Location: Singapore
Posts: 5

Original Poster
Rep: Reputation: 0
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

Last edited by Kitara; 05-24-2004 at 02:51 AM.
 
Old 05-24-2004, 03:01 AM   #5
Kitara
LQ Newbie
 
Registered: May 2004
Location: Singapore
Posts: 5

Original Poster
Rep: Reputation: 0
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!

Last edited by Kitara; 05-24-2004 at 03:05 AM.
 
Old 05-24-2004, 03:41 AM   #6
jacky
LQ Newbie
 
Registered: May 2004
Posts: 21

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
access 403 forbidden - user_dir sigurdne Linux - Newbie 6 11-27-2004 05:55 AM
Error 403 Forbidden access in Apache anoop_cn Linux - Software 1 09-21-2004 09:32 AM
access 403 forbidden - questions from a newbie vr6stress Linux - Newbie 1 05-21-2004 07:31 AM
Apache - 403 Forbidden - Access to Subdirectories dieter Linux - Networking 2 03-25-2004 12:51 PM
403 Forbidden access to web with php and cgi scripts tonyboy Linux - Software 3 03-17-2004 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration