Q:

http apache server doesn't handle php files

In my centos:
php -v  works gives 5.4 version
the httpd server is running and working
AddType application/x-httpd-php .php

this line of code is in httpd.conf, why the index.php file isn't hanled?
is there anyway that I can check if its all ok?
output of rpm -qa | grep php:
php54-pdo-5.4.26-1.ius.el6.x86_64
php54-mbstring-5.4.26-1.ius.el6.x86_64
php54-common-5.4.26-1.ius.el6.x86_64
php54-mysql-5.4.26-1.ius.el6.x86_64
php54-ldap-5.4.26-1.ius.el6.x86_64
php54-gd-5.4.26-1.ius.el6.x86_64
php54-mcrypt-5.4.26-1.ius.el6.x86_64

also I get this error after sudo yum install php -y:
--> Finished Dependency Resolution
Error: Package: php-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libssl.so.10(libssl.so.10)(64bit)
Error: Package: php-cli-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libcrypto.so.10(OPENSSL_1.0.1)(64bit)
Error: Package: php-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: php-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libcrypto.so.10(OPENSSL_1.0.1)(64bit)
Error: Package: php-cli-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)
Error: Package: php-cli-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: php-cli-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libssl.so.10(libssl.so.10)(64bit)
Error: Package: php-5.4.26-32.el6.art.x86_64 (atomic)
           Requires: libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

A:

First insure that you have the PHP Apache module installed.  
ls -l /etc/httpd/conf.d/php.conf

If you don't have that file then you may just have the php-cli (command line interface) installed without the php Apache httpd module.  To install run the command:
sudo yum install php -y

Then restart your httpd server:
sudo service httpd restart

For Apache httpd to process index.php files, you need to update your DirectoryIndex to handle PHP directory indexes.
On Centos edit the file:
/etc/httpd/conf/httpd.conf

Search for the line starting:
DirectoryIndex

And add the following to the space delimited list of index filenames:
index.php

Directory index files will be recognized in the order they are defined.
You will also need to restart your httpd service using:
sudo service httpd reload

Alternatively you can use the apachectl utility to reload httpd gracefully
sudo apachectl graceful

