• I tried to upgrade to 1.5 today. Before I began, my blog was working fine. When I had finished, I got an internal server error when I tried to log in to or even look at my blog.

    Not a problem – I had backed up my entire blog directory first. So I deleted everything that had been changed, and uploaded the files from the backup. I also changed all the file permissions to 766.

    However, even though I’m (in theory) back to how I was this morning before I changed anything, I’m still getting the 500 internal server error!

    Here’s a representative sample of what’s in my error log:

    [Sat Mar 12 10:54:29 2005] [error] [client 24.21.136.225] File does not exist: /home/amptoon/public_html/404.shtml
    [Sat Mar 12 10:54:29 2005] [error] [client 24.21.136.225] File does not exist: /home/amptoon/public_html/favicon.ico
    [Sat Mar 12 10:54:28 2005] [error] [client 24.21.136.225] File does not exist: /home/amptoon/public_html/500.shtml
    [Sat Mar 12 10:54:28 2005] [alert] [client 24.21.136.225] /home/amptoon/public_html/blog/.htaccess: RewriteRule: bad flag delimiters
    [Sat Mar 12 10:54:27 2005] [error] [client 24.34.123.210] File does not exist: /home/amptoon/public_html/403.shtml
    [Sat Mar 12 10:54:02 2005] [error] [client 65.96.163.255] File does not exist: /home/amptoon/public_html/500.shtml
    [Sat Mar 12 10:54:02 2005] [alert] [client 65.96.163.255] /home/amptoon/public_html/blog/.htaccess: RewriteRule: bad flag delimiters
    [Sat Mar 12 10:53:03 2005] [error] [client 69.211.48.141] File does not exist: /home/amptoon/public_html/404.shtml
    [Sat Mar 12 10:53:03 2005] [error] [client 69.211.48.141] File does not exist: /home/amptoon/public_html/favicon.ico
    [Sat Mar 12 10:53:03 2005] [error] [client 142.46.227.225] File does not exist: /home/amptoon/public_html/500.shtml
    [Sat Mar 12 10:53:03 2005] [alert] [client 142.46.227.225] /home/amptoon/public_html/blog/.htaccess: RewriteRule: bad flag delimiters
    [Sat Mar 12 10:53:02 2005] [error] [client 69.211.48.141] File does not exist: /home/amptoon/public_html/500.shtml
    [Sat Mar 12 10:53:02 2005] [alert] [client 69.211.48.141] /home/amptoon/public_html/blog/.htaccess: RewriteRule: bad flag delimiters

    As far as I can tell, I have no .htaccess file.

    If anyone could make any suggestions, I’d very much appreciate it. (Keep in mind that I’m not all that computer-literate!) Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • I’d say you do have a .htaccess, and that it is hidden.
    it needs finding and removing

    Thread Starter ampersand

    (@ampersand)

    Thanks!

    Can you suggest how I’d go about finding and removing a hidden .htaccess file?

    Thread Starter ampersand

    (@ampersand)

    I found an old .htaccess file from early January on my hard drive, and uploaded it. Even though I just uploaded it, it still doesn’t appear in my ftp program’s directory listing of what’s on my server, so I guess my server is somehow set up to hide the .htaccess file. How annoying.

    Uploading the old file did make a difference, however. Now I’m getting this error when I try to look at my blog (www.amptoons.com/blog):

    Warning: main(/home/amptoon/public_html/blog/wp-includes/wp-db.php): failed to open stream: Permission denied in /home/amptoon/public_html/blog/wp-settings.php on line 30

    Fatal error: main(): Failed opening required ‘/home/amptoon/public_html/blog/wp-includes/wp-db.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/amptoon/public_html/blog/wp-settings.php on line 30

    So that’s different from a 500 internal server error, at least.

    Which ftp client are you using ?
    There are a few listed here:
    http://www.tamba2.org.uk/wordpress

    Thread Starter ampersand

    (@ampersand)

    I have been using cuteFTP.

    I just downloaded firezilla and looked with that – no dice. .htaccess still doesn’t show up.

    Going through cpanel’s file listings, I can finally see the .htaccess files – there was one in the main directory and one in the blog directory. I deleted them both. The one in the main directory didn’t get fully deleted – it still shows up in the cpanel file listing – but it did change to being “0 kb” in size. The one in the blog direcotry is deleted entirely.

    Still no change in the error message, however.

    Which url should be find these errors on ?

    Thread Starter ampersand

    (@ampersand)

    Which url should be find these errors on ?

    Both on http://www.amptoons.com/blog/wp-login.php and on http://www.amptoons.com/blog/

    I see an error:

    Warning: main(/home/amptoon/public_html/blog/wp-includes/wp-db.php): failed to open stream: Permission denied in”

    Change the permissions of wp-includes to at least 755 ?

    Thread Starter ampersand

    (@ampersand)

    Both the wp-includes directory, and all of its contents, are already set to 766. (?)

    It’s a permissions error …….. tried altering wp-settings.php ?

    Thread Starter ampersand

    (@ampersand)

    I’m afraid I haven’t got a clue. In what way, exactly, should I alter wp-settings?

    Thanks for your help, by the way; I can’t even begin to explain how frustrating this all is. Maybe I should just wipe everything clean and start new? But I don’t even know that doing that would solve the problem….

    Here’s the current text to my wp-settings, in case that helps.

    <?php
    $HTTP_HOST = getenv(‘HTTP_HOST’); /* domain name */
    $REMOTE_ADDR = getenv(‘REMOTE_ADDR’); /* visitor’s IP */
    $HTTP_USER_AGENT = getenv(‘HTTP_USER_AGENT’); /* visitor’s browser */

    // Fix for IIS, which doesn’t set REQUEST_URI
    if (! isset($_SERVER[‘REQUEST_URI’])) {
    $_SERVER[‘REQUEST_URI’] = $_SERVER[‘SCRIPT_NAME’];

    // Append the query string if it exists and isn’t null
    if (isset($_SERVER[‘QUERY_STRING’]) && !empty($_SERVER[‘QUERY_STRING’])) {
    $_SERVER[‘REQUEST_URI’] .= ‘?’ . $_SERVER[‘QUERY_STRING’];
    }
    }

    if ( !(phpversion() >= ‘4.1’) )
    die( ‘Your server is running PHP version ‘ . phpversion() . ‘ but WordPress requires at least 4.1’ );

    if ( !extension_loaded(‘mysql’) )
    die( ‘Your PHP installation appears to be missing the MySQL which is required for WordPress.’ );

    function timer_start() {
    global $timestart;
    $mtime = explode(‘ ‘, microtime() );
    $mtime = $mtime[1] + $mtime[0];
    $timestart = $mtime;
    return true;
    }
    timer_start();

    // Change to E_ALL for development/debugging
    error_reporting(E_ALL ^ E_NOTICE);

    // For an advanced caching plugin to use, static because you would only want one
    if ( defined(‘WP_CACHE’) )
    require (ABSPATH . ‘wp-content/advanced-cache.php’);

    define(‘WPINC’, ‘wp-includes’);
    require_once (ABSPATH . WPINC . ‘/wp-db.php’);

    // Table names
    $wpdb->posts = $table_prefix . ‘posts’;
    $wpdb->users = $table_prefix . ‘users’;
    $wpdb->categories = $table_prefix . ‘categories’;
    $wpdb->post2cat = $table_prefix . ‘post2cat’;
    $wpdb->comments = $table_prefix . ‘comments’;
    $wpdb->links = $table_prefix . ‘links’;
    $wpdb->linkcategories = $table_prefix . ‘linkcategories’;
    $wpdb->options = $table_prefix . ‘options’;
    $wpdb->postmeta = $table_prefix . ‘postmeta’;

    if ( defined(‘CUSTOM_USER_TABLE’) )
    $wpdb->users = CUSTOM_USER_TABLE;

    // We’re going to need to keep this around for a few months even though we’re not using it internally

    $tableposts = $wpdb->posts;
    $tableusers = $wpdb->users;
    $tablecategories = $wpdb->categories;
    $tablepost2cat = $wpdb->post2cat;
    $tablecomments = $wpdb->comments;
    $tablelinks = $wpdb->links;
    $tablelinkcategories = $wpdb->linkcategories;
    $tableoptions = $wpdb->options;
    $tablepostmeta = $wpdb->postmeta;

    require (ABSPATH . WPINC . ‘/functions.php’);
    require (ABSPATH . WPINC . ‘/default-filters.php’);
    require_once (ABSPATH . WPINC . ‘/wp-l10n.php’);

    $wpdb->hide_errors();
    if ( !update_user_cache() && !strstr($_SERVER[‘PHP_SELF’], ‘install.php’) ) {
    if ( strstr($_SERVER[‘PHP_SELF’], ‘wp-admin’) )
    $link = ‘install.php’;
    else
    $link = ‘wp-admin/install.php’;
    die(“It doesn’t look like you’ve installed WP yet. Try running install.php.”);
    }
    $wpdb->show_errors();

    require (ABSPATH . WPINC . ‘/functions-formatting.php’);
    require (ABSPATH . WPINC . ‘/functions-post.php’);
    require (ABSPATH . WPINC . ‘/classes.php’);
    require (ABSPATH . WPINC . ‘/template-functions-general.php’);
    require (ABSPATH . WPINC . ‘/template-functions-links.php’);
    require (ABSPATH . WPINC . ‘/template-functions-author.php’);
    require (ABSPATH . WPINC . ‘/template-functions-post.php’);
    require (ABSPATH . WPINC . ‘/template-functions-category.php’);
    require (ABSPATH . WPINC . ‘/comment-functions.php’);
    require (ABSPATH . WPINC . ‘/feed-functions.php’);
    require (ABSPATH . WPINC . ‘/links.php’);
    require (ABSPATH . WPINC . ‘/kses.php’);
    require (ABSPATH . WPINC . ‘/version.php’);

    if (!strstr($_SERVER[‘PHP_SELF’], ‘install.php’) && !strstr($_SERVER[‘PHP_SELF’], ‘wp-admin/import’)) :
    // Used to guarantee unique hash cookies
    $cookiehash = md5(get_settings(‘siteurl’)); // Remove in 1.4
    define(‘COOKIEHASH’, $cookiehash);
    endif;

    require (ABSPATH . WPINC . ‘/vars.php’);

    do_action(‘core_files_loaded’);

    // Check for hacks file if the option is enabled
    if (get_settings(‘hack_file’)) {
    if (file_exists(ABSPATH . ‘/my-hacks.php’))
    require(ABSPATH . ‘/my-hacks.php’);
    }

    if ( get_settings(‘active_plugins’) ) {
    $current_plugins = get_settings(‘active_plugins’);
    foreach ($current_plugins as $plugin) {
    if (” != $plugin && file_exists(ABSPATH . ‘wp-content/plugins/’ . $plugin))
    include_once(ABSPATH . ‘wp-content/plugins/’ . $plugin);
    }
    }

    if ( defined(‘WP_CACHE’) && function_exists(‘wp_cache_postload’) )
    wp_cache_postload();

    do_action(‘plugins_loaded’);

    define(‘TEMPLATEPATH’, get_template_directory());

    // Load the default text localization domain.
    load_default_textdomain();

    // Pull in locale data after loading text domain.
    require_once(ABSPATH . WPINC . ‘/locale.php’);

    if ( !get_magic_quotes_gpc() ) {
    $_GET = add_magic_quotes($_GET );
    $_POST = add_magic_quotes($_POST );
    $_COOKIE = add_magic_quotes($_COOKIE);
    $_SERVER = add_magic_quotes($_SERVER);
    }

    function shutdown_action_hook() {
    do_action(‘shutdown’);
    }
    register_shutdown_function(‘shutdown_action_hook’);

    // Everything is loaded.
    do_action(‘init’);
    ?>

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘500 Internal Server Error’ is closed to new replies.