LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2007, 09:37 AM   #1
Frank Soranno
Member
 
Registered: Jun 2005
Location: Scranton, Pa. USA
Distribution: Debian
Posts: 230

Rep: Reputation: 30
Can't open PHP in Apache ?


Hi all,
Just installed Apache & Php5, Have all my php scripts in /var/www directory, and then went to my apache webserver to open script phpinfo.php, but I just get an error 404 message.
I can see apache page open with localhost/ It opens, yet can't open localhost/phpinfo.php or any html script either. here is my /var/www directory,

[root@localhost www]# ls
cgi-bin hello hello.php~ icons phpinfo.php test.php
error hello.php html new.html phpinfo.php~

What do I try? Thanks
 
Old 04-17-2007, 10:00 AM   #2
TylerK
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by Frank Soranno
Hi all,
Just installed Apache & Php5, Have all my php scripts in /var/www directory, and then went to my apache webserver to open script phpinfo.php, but I just get an error 404 message.
I can see apache page open with localhost/ It opens, yet can't open localhost/phpinfo.php or any html script either. here is my /var/www directory,

[root@localhost www]# ls
cgi-bin hello hello.php~ icons phpinfo.php test.php
error hello.php html new.html phpinfo.php~

What do I try? Thanks
The default WWW root is probably /var/www/html/, so you would want to put your scripts into that directory.
 
Old 04-17-2007, 10:35 AM   #3
Frank Soranno
Member
 
Registered: Jun 2005
Location: Scranton, Pa. USA
Distribution: Debian
Posts: 230

Original Poster
Rep: Reputation: 30
Thanks TylerK, That was it, Oversight my bad.

Last edited by Frank Soranno; 04-17-2007 at 11:16 AM.
 
Old 04-17-2007, 11:13 AM   #4
Frank Soranno
Member
 
Registered: Jun 2005
Location: Scranton, Pa. USA
Distribution: Debian
Posts: 230

Original Poster
Rep: Reputation: 30
Smile Resolved!

It was that my root directory is /var/www/html,
Thanks, That did it, Just an over sight.
 
  


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
Open source IDE for PHP, MySQL, Apache, Red Hat 9 lothario Red Hat 2 06-02-2010 02:27 AM
You have chosen to open index.php which is a : PHP Script from: http://localhost cucolin@ Linux - Software 3 01-30-2007 03:58 PM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
Apache/PHP - failed to open stream ridertech Linux - Software 1 08-10-2004 09:38 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:19 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