LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP- Localhost problem (https://www.linuxquestions.org/questions/programming-9/php-localhost-problem-629696/)

phodopus 03-21-2008 01:13 PM

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...

Tinkster 03-21-2008 02:42 PM

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

Cheers,
Tink

phodopus 03-22-2008 08:39 AM

Downloaded and installed the XAMPP Apache Distribution which works perfectly, although the security is bad.

Tinkster 03-22-2008 10:24 AM

Heh. Solving problems the windows way ;}



Cheers,
Tink

phodopus 03-23-2008 05:27 AM

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


All times are GMT -5. The time now is 04:44 AM.