Yes, I have installed PHP with yum. I used php* and just recently was told that there is nothing to install, it is all up to date. I
did a yum search php first, and tried to install a bunch of php modules, all of which are already installed. I had done that a while back. I think I might have done that from the CentOS desktop and now I’m working mainly from ssh.
By not working, I mean that the index.php file does not get processed as php
– yes, I checked that the file was renamed .php and that there is no .html file that could be run instead of the php file. So, I added to a test file named index.php, and in the body I have a simple
In the tutorials I found online, there is mention of the php configuration can be in the httpd.conf file or it can be called from that file. I have this line in the httpd.conf Include conf.d/*.conf Will that work? I am calling that from the file /etc/httpd/conf/httpd.conf so it seems like a relative path would be ../conf.d/*.conf, unless this is relative to this:
So, inside /etc/httpd/conf.d/php.conf I have
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
LoadModule php5_module modules/libphp5.so
LoadModule php5_module modules/libphp5-zts.so
# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php5-script .php AddType text/html .php
# Add index.php to the list of files that will be served as directory
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
AddType application/x-httpd-php-source .phps
That should be enough at least get the phpinfo(); command to run. At some point, I got a message about there not being a php.ini file anywhere. Also, none of the other various php modules are being called anywhere. Still, I’m perplexed that I cannot get anything to run in terms of php. I could try a simple echo command to test something even simpler. Thanks, It’s great that there is such active response on this list… fast response times when seeking help. :-)