Click to See Complete Forum and Search --> : Installing PHP4 on Apache


Anon
02-09-2001, 10:07 AM
I just installed PHP4 on my local Apache server. I updated the httpd.conf files with what I thought were the right changes. When I run a .php page the root of the web server with a simple php fuction I see a blank page. If I add text to the page, I see the text but no results from the PHP code function. There are no errors, and everything else works fine.

Any ideas about why it is not working would be most appreciated.

Thanks,

DJ

smarlowe
02-10-2001, 03:06 PM
Do a "View Source" in your web browser and see if you can see the php code in the page or not. If the PHP code is showing in the source, then you missed one of the files you needed to add to httpd.conf.

Also, make sure you restart apache (easy way is :

killall -9 httpd
httpd

to be sure that all the children are killed before the httpd parent restarts.

Anon
02-11-2001, 03:22 AM
I am having the same problem.
As you said missing one of the files ...

then what is the files ?

smarlowe
02-12-2001, 11:59 AM
Actually it's a line in the httpd.conf you need.

You need the following three lines, fourth line is optional:
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps

then killall -1 httpd should restart apache and you should be serving php pages.

ndrtkr
05-22-2002, 10:55 AM
Scott, I'm having the same "blank screen" problem on Windows; i added the lines you wrote and restarted the apache server, but then i get an error saying "The request operation has failed"...

This is specifically on the LoadModule and AddModule directives. The modules i'm trying to load are not present on my PHP/Apache files...