Updated the PHP on server. Getting this error: Please ensure that $craftPath is set correctly I am running Amazon Ec2 instance and tried updating the PHP on the site using this guide: http://brianshim.com/webtricks/update-amazon-ami-php5-3-to-php5-4/

And now this is the error I am receiving:
Please ensure that $craftPath is set correctly in /var/www/html/staging/public/index.php

I tried resetting the permissions, and restored the old http config files, to no avail. I have no idea what it could be. I checked php.ini for open_basedir and did not find it. 

Could it be the permissions?
All Craft is doing is using PHP's is_file() method to check if the supplied path to craft/app/index.php returns true or not.

Take Craft out of the picture and setup a simple PHP script that does 

&lt;?php

if (is_file('path/to/craft/app/index.php')) {
    echo "found it";
} else {
    echo "oops";
}


If you get an "oops", then there is some environmental issue (PHP permissions, open_basedir restrictions, Suhosin, mod_security, etc.) that is preventing PHP from finding that file that will need to be addressed.

If it is permissions related (the most common cause), there is a handy script here that will properly set the permissions for a Craft install: https://github.com/nystudio107/craft-scripts/tree/master/scripts