I had been attempting to add curl support to php on the VPS, and after signing in and seeking to carry out a php upgrade, my website provides me with a 500 error each time I attempt to gain access to it.

So, I attempted refreshing apache install with easyApache, also it went swimmingly outdoors to the fact that php scripts still did not work.

I made the decision there has to be something happening with php parsing, and so i tail -f'd /etc/httpd/logs/error_log and attempted moving towards the site, and affirmed, it appears like there is something wrong using the headers.

This is what the mistake log is producing on all php file demands:

[Fri Jun 18 20:01:47 2010] [error] [client] malformed header from script. Bad header=<head> : index.php

So far as I will tell, the "Bad header" always equals the very first type of the php script.

Regrettably, I am super stumped following this, I have never encounter issues such as this, and although I understand my way around unix, I am no server admin.

I guess this may be a serverfault question, however i figure this is actually the kind of factor designers may encounter, so everyone might have the ability to help.

It appears you've upgraded from PHP < 5.2.3 to PHP >= 5.2.3. Within the PHP 5.2.3 changelog, read:

Transformed CGI install target to php-cgi and 'make install' to set up CLI when CGI is chosen.

You should utilize the php-cgi binary and never the php binary.

Inside your Apache configuration, look into the following line:

Action application/x-httpd-php /usr/bin/php-cgi

Whether it's pointing towards the /usr/bin/php binary, point it to php-cgi.