-   Linux - Newbie (
-   -   PHP Configuration [Need urgent help] (

drweb 06-24-2003 10:28 AM

PHP Configuration [Need urgent help]
Im new to Linux and I set up a web server. I can get it to pull up html files. However when I made a small generic php file...

echo "Hello World";

Save is as "test.php" and try to access it I just get a blank page. Any ideas? Does PHP have to be enabled somewhere?

acid_kewpie 06-24-2003 10:30 AM

please do mark any post as urgent, as it is considered rude.
(many people will actually deliberatly avoid threads marked as such)

jharris 06-24-2003 10:36 AM

What do you see if you view the source of the "blank" page? If you built the webserver yourself and didn't include PHP specifically then you'll need to download it from, if the web server came with the distro then its pretty likely that it'll be there. What distro are you using?



drweb 06-24-2003 02:09 PM

I have installed all the packages of PHP during intalling linux 8. I have cheked that html files are being displayed but php files are not being displayed. apache webserver is working fine. I have also checked using rpm -q php, rpm - q mysql, rpm -q apache, all are working fine. mysql and apache are running in services too, but my php code is not being translated, so I am very much worried about it from last 2 weeks. I have read every where got not solution.Please help me in this matter.

Thanks in advance.

andrew001 06-24-2003 02:43 PM


Make sure you have '' or '' in apache/libexec. If you don't you'll need to download php, and compile it with apxs.

If exists in the correct place, then your problem would be that apache doesn't understand what a '.php' means. Make sure you have these lines in httpd.conf :

LoadModule php4_module libexec/
AddType application/x-httpd-php .php

If you get an error after adding these, then you don't have php installed as you will need it, but it isn't too hard to compile it from source with apxs and mysql support

jharris 06-24-2003 02:57 PM

And what did looking at the source of your blank page turn up?


All times are GMT -5. The time now is 05:31 PM.