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 03-21-2008, 01:13 PM   #1
phodopus
Member
 
Registered: Aug 2006
Location: Belgium
Distribution: Slackware 13.0
Posts: 62

Rep: Reputation: 15
PHP- Localhost problem


Just did a fresh Slackware 12 install.

I can't view my php files in a brower.
This is what I type:
Code:
<?php 

echo 'Hello World!';

?>
/srv/httpd/htdocs is the default directory. (/etc/httpd/httpd.conf says: DocumentRoot "/srv/httpd/htdocs")

So I put a hello.php file in /srv/httpd/htdocs and if I go to http://localhost/hello.php, this is what I get:

<?php
echo 'Hello World';
?>

I should see: Hello World...

I've tried to do
Code:
apachectl restart
, which says
Quote:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
So I can't find the problem...
 
Old 03-21-2008, 02:42 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Is apache configured to use php at all?
In other words ...
is
#Include /etc/httpd/mod_php.conf
uncommented in httpd.conf?

Cheers,
Tink

Last edited by Tinkster; 03-21-2008 at 02:44 PM.
 
Old 03-22-2008, 08:39 AM   #3
phodopus
Member
 
Registered: Aug 2006
Location: Belgium
Distribution: Slackware 13.0
Posts: 62

Original Poster
Rep: Reputation: 15
Downloaded and installed the XAMPP Apache Distribution which works perfectly, although the security is bad.
 
Old 03-22-2008, 10:24 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Heh. Solving problems the windows way ;}



Cheers,
Tink
 
Old 03-23-2008, 05:27 AM   #5
phodopus
Member
 
Registered: Aug 2006
Location: Belgium
Distribution: Slackware 13.0
Posts: 62

Original Poster
Rep: Reputation: 15
Wink

Quote:
The distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.
Never had a better way to write and test my php-applications .

cheers
 
  


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
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
///localhost/~user ftp + php obstacle janus_tr Debian 1 11-15-2006 08:39 PM
php on localhost mandrivaLE2005 Programming 3 07-27-2005 08:22 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 03:23 PM
php fails to find localhost anindyanuri Programming 6 03-19-2005 09:03 AM

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

All times are GMT -5. The time now is 10:22 PM.

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