To solve this problem,
There are a couple of things you can do to fix this, but we’ll start with the one that usually works also works for me.
In your magento setup files, there should be a file called php.ini.sample Rename this to php5.ini and simple place it in your web root directory.
Its work for me.
You can create the php5.ini and upload it to your web root directory.
If that doesn’t work, add the following to the end of your newly renamed/created php5.ini file:
cgi.fix_pathinfo = 1
And if you’re still getting the error, add the following to the top of your .htaccess file:
# Options -MultiViews
Change to (just remove #)
again if you are getting image problem
just rename .htaccess file
.htaccess to .htaccess~~