Forums

[resolved] Error when first running install.php (10 posts)

  1. boykin
    Member
    Posted 6 years ago #

    I just went to install WordPress and ran into the following: Starting with the .tar file I unarchived it and created a wp-config.php file. When I run install.php I get:

    WordPress database error: [Table 'wordpress.wp_users' doesn't exist]
    SELECT * FROM wp_users WHERE user_login = 'admin'

    Followed by the normal first-step text. Any ideas?

  2. petit
    Member
    Posted 6 years ago #

    Ideas:
    1. Did you create an empty database for WP in your MySQL database?
    2. Did you complete your config.php file with all login details for your database?
    The wp-users table should have been created when you run the install.php script.

    http://codex.wordpress.org/Installing_WordPress

  3. boykin
    Member
    Posted 6 years ago #

    1) Yes, the 'wordpress' database does exist and indeed has a bunch of entries in there for an older version of WP.
    2) Yes, the wp-config.php file has all the information. If it didn't then it wouldn't have been able to connect to the database and discover that this table didn't already exist!

    And yes, if I let the installation continue, the installation is completed.

    The problem here is that before the installation even starts I'm getting an error. For some, this may just be aesthetic and not matter, but for my environment, it does.

  4. boykin
    Member
    Posted 6 years ago #

    It took me a while to trace through the code, but I found the problem. If some kind developer wants to take note, here's the problem and the fix:

    Near the end of wp-settings.php is the item:
    do_action('init');

    This really calls kses_init from wp-includes/kses.php.

    Within kses_init is a call to "get_currentuserinfo()", which is what is throwing the error because there is no current user. Below is a version (OK, I'll admit there might be a better way, but hey, this works!) that fixes the problem:

    function kses_init() {
    global $current_user;
    global $wpdb;

    $wpdb->hide_errors();
    $ret = get_currentuserinfo(); // set $current_user
    $wpdb->show_errors();
    if($ret == false)
    return;

    if (current_user_can('unfiltered_html') == false)
    kses_init_filters();
    }

  5. bladesun
    Member
    Posted 6 years ago #

    hello, I'm trying also to install wordpess with no luck.
    I'm new to working withwordpress and to working with SQL..
    I've read the comments above and yet, no luck.
    things that might be wrong with the installation:

    I have an empty database in my webSQL server, it's name is the same as the username is it ok ?

    I've got also a PUBS database in my server, do I need to write it down as the db_name ?

    or, how does a db_name should look like ?

    thank you for helping.

  6. bladesun
    Member
    Posted 6 years ago #

    My Server version is Microsoft SQL Server 2000 - 8.00.2039 (Intel X86), could it be related to the problem ?

  7. Les Bessant
    Moderator
    Posted 6 years ago #

    Errr, yes, that would be a problem. WordPress requires MySQL, and as far as I'm aware won't work with MS SQL Server.

  8. moshu
    Member
    Posted 6 years ago #

    It has to be a MySQL database - as it says in Requirements. No other database works at this moment.

  9. bladesun
    Member
    Posted 6 years ago #

    Thank you.

  10. petit
    Member
    Posted 6 years ago #

    boykin, you're a hero :-)
    When you said you run the install.php I was sure your database was new. Otherwise you'd hav run the update.php instead.
    I couldn't have found your solution, nowing some things about programming but nothing about PHP. Good job!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.