PHP 5 will not work in Centos 6 for me
No need to edit httpd.conf. PHP is includes it's binding from /etc/httpd/conf.d/php.conf, which is included by include directive at httpd.conf. It's enough to check php.conf and ensure that all required lines are not commented. It should work by default with prefork httpd. Probably something was wrong with your php.conf.
Related videos on Youtube
LaserBeak
Updated on September 18, 2022Comments
-
LaserBeak over 1 year
Just created a new install of Centos 6.0 64-bit on a virtual machine and running on Vmware workstation 8, windows host.
yum install php service httpd restart
And when trying to run a html file from the var\www\html dir which just has
<?php phpinfo(); ?>
in it or pointing browser to localhost. Nothing comes up.Also opened up httpd.conf and added:
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
Tried reinstalling, installing php-common, then php etc. to no avail. Otherwise going for the typical LAMP.
installed:
php.x86_64 5.3.2-6.el6_0.1 @updates php-cli.x86_64 5.3.2-6.el6_0.1 @updates php-common.x86_64 5.3.2-6.el6_0.1 @updates
Yet to update to Centos 6.1
PHP5 is probably comes installed by default with Centos and I maybe stuffed it up by running
yum install php
?-
Khaled over 12 yearsAny relevant httpd logs?
-
Selivanov Pavel over 12 years"And when trying to run a html file" Stupid question, but... does the file have .php extension?
-
LaserBeak over 12 yearsyeah, just added.
-
fxmtor over 12 yearsIs there any php related stuff in /etc/httpd/conf.d?
-