Currently no errors anywhere, when I visit a php page in my browser, it just outputs the php code to the browser,
I have a .htaccess file with the following
AddType application/x-httpd-php .php
php still not running, php -v shows php installed: PHP 5.3.10 (cli) (built: Feb 4 2012 07:36:51) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
I just need to get apache to execute the php code.
If you have php installed try to create php configuration in /etc/httpd/conf.d/php.conf:
It should be included by default on redhat like distros. (you can check it yourself if you have Include conf.d/*.conf in your httpd.conf.
Adding this sort of configuration to .htaccess is not a best idea imo and should be staticly placed in *.conf files... are you sure that AllowOverride is not set to None?