php not working in LAMP (CentOS 5)
I followed the procedure stated over here (
Now two things have happened.
1) php.ini file is not in etc/php5/apache2/ as mentioned in the link above, instead it is in etc/
2) i created a test file, named index.php in srv/www/mysite.com/public_html , but when i try
AddType application/x-httpd-php .php .foo
AddType application/x-httpd-php-source .phps .phtmls
DirectoryIndex index.php index.htm index.html
it is now displaying a pop-up to download index.php
Any help please.
Thanks in advance
Milan
–-----------------
Update:
I restored the original httpd.conf file for apache and removed virtualhosts too.
Hence, now i placed file test.php in var/www/html/
and this is what i get
php is displayed as text.
6 Replies
I found out that command line php works. So i guess php just got installed in wrong path or i need to set path or change few settings in httpd.conf
Maybe i will try yum install php
@mikeindia:
yes. i restarted apache quite a few times. but no luck.
I found out that command line php works. So i guess php just got installed in wrong path or i need to set path or change few settings in httpd.conf
Maybe i will try yum install php
I tried yum remove php and then yum install php
still the same problem.
LoadModule php5_module /etc/httpd/modules/libphp5.so
@BarkerJr:
Please verify that there is a line like this in httpd.conf:
LoadModule php5_module /etc/httpd/modules/libphp5.so
Hi,
there is no such line in httpd.conf It seems php5 didnt get install correctly. But a day or two, the code now works. Seems like this one had problem with rebooting system.
So now php is working fine.
Thanks to all for help.
Milan