I’m having a similar problem. I have the wordpress folders uploaded into a folder called ‘blog’. I’ve set the blog folder permissions to 755. The ‘wp-admin’ folder is also set to 755. Inside this folder I have a test php file called hello.php. I open it up in my web browser and I receive a Hello World! I then open up ‘install.php’, which is in the same folder, and get an Internal Server Error. Both the hello.php file and the install.php file are set to 755. Any advice?
This has nothing to do with the permissions set on your folders. It’s a server issue that has to do with the way your host has set up your system. If you have an .htaccess file, rename it to .htaccess_BAK and see if that helps. Otherwise, it’s not a WordPress issue – it’s your host you need to contact.
Thanks for the reply. It’s my university’s server, and I can’t find any contact information.
BUT, I found the problem. The server requires the line ‘#!/usr/local/bin/php’ to be at the top of each php file. Is there something I can put in the htaccess file that will allow me to run the files without having to put this in manually? Thanks!
You don’t need that line in *every* php file. Many of the php files are included (for example, you can put it at the top of “index.php”, but you won’t need to put it in “header.php”, “footer.php” or “sidebar.php” because the index file calls them all into one place with includes.
Thread Starter
lorenz
(@lorenz)
Hai all, i’ve solved the problem, now it runs well.
The root of the problem in my server is php (php sapi) installed as cgi not cli, just comment several lines in function status_header() in wp-includes/functions.php.
function status_header( $header ) {
if ( 200 == $header )
$text = ‘OK’;
elseif ( 301 == $header )
$text = ‘Moved Permanently’;
elseif ( 302 == $header )
$text = ‘Moved Temporarily’;
elseif ( 304 == $header )
$text = ‘Not Modified’;
elseif ( 404 == $header )
$text = ‘Not Found’;
elseif ( 410 == $header )
$text = ‘Gone’;
// if ( substr(php_sapi_name(), 0, 3) == ‘cgi’ )
// @header(“HTTP/1.1 $header $text”);
// else
@header(“Status: $header $text”);
}