Click to See Complete Forum and Search --> : phpinfo source is displayed instead of formatted page


anadeem
03-25-2008, 06:33 AM
Hi list
I installed php 5.2.5 alongwith apache and mysql from source(tar.gz)on fedora core 8 . everthingthing was ok. now i started apachectl and it is working and showing the page. i create a page of phpinfo.php . when i want to see this page in firefox browser. its source code is shown instead of the formatted page with php info.
when i do the install from rpms . everthing is ok.what the problem may be ...
and how to resolve it.
Regards.
ANadeem

laserlight
03-25-2008, 07:24 AM
Check the Apache configuration file (httpd.conf). Check that it has a line like:
AddType application/x-httpd-php .php

Note that this line may be included from a subsidiary configuration file for the PHP configuration. If it is missing, either include it in the Apache configuration file, or in the subsidiary configuration file for PHP, if one exists.

anadeem
03-26-2008, 06:04 AM
before writing the mail i had added and checked the page. but it was showing the source. I again checked , it is there in httpd.conf. what other possibility may be.

anadeem
03-26-2008, 06:26 AM
neither LoadModule libphp5.so line exists nor the file exists. once i installed php5 with prefix=/www, the file was created. but second time i installed on the default path, file was not created. what should i do to create this file . if i copy the file from /www/modules to /usr/local/apache2/modules and add the LoadModule line to httpd.conf, an error is reported on that line.
i think the error is due to not loading the libphp5.so module. so how to create the module and load.
I am using Fedora Core 8 . do you think it is issue of the OS?
ANadeem