WordPress.org

Ready to get started?Download WordPress

Forums

Errors while running install.php (Database, user+pass is correct) (13 posts)

  1. anthem501
    Member
    Posted 9 years ago #

    Howdy everyone.

    I've used WordPress before, but at one point I grew tired of blogging and deleted the old blog etc. Now I see that WP1.5 is out, and I really want to give it a try again. I am, however, getting a whole bunch of errors while running the install.php -->

    Warning: Invalid argument supplied for foreach() in C:\W3Sites\evenstarr\www\wordpress\wp-includes\functions.php on line 355

    WordPress database error: [Table 'wordpress00420.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'permalink_structure'

    . . . . and so it says for all the tables it needs, etc. I've doublechecked to see if the database exists, and it does, and the username and password I've provided in my config-file are also correct. The installation is a fresh install, all I've done is unzip the files into a folder, and then upload it to http://evenstarr.org/wordpress.

    The server is hosted by http://concor.dk, and it's running Windows Server 2003 if that's of any help.

    Can you guys please help me out? I'd love to start out blogging with this great tool again.

    Thanks in advance,

    Daniel

  2. anthem501
    Member
    Posted 9 years ago #

    Anyone? :(

  3. anthem501
    Member
    Posted 9 years ago #

    Seriously, aren't there anyone with just the slightest idea of what's wrong?

  4. ColdForged
    Member
    Posted 9 years ago #

    What are the parameters you've specified in the wp-config.php file (don't post the password)?

  5. nicko
    Member
    Posted 9 years ago #

    I had similar errors, basically all I could work out was the Database wasn't been created. So I hacked a little work around.

    In wp-admin/upgrade-functions.php
    I inserted the following line
    $wpdb->query($qry)
    in a loop in the
    dbDelta function

    You can see it below after the foreach statement.
    Just look for that for each near the top of the dbDelta function and
    insert the line.

    // Create a tablename index for an array ($cqueries) of queries
    foreach($queries as $qry) {
    $wpdb->query($qry);
    if(preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) {

    Hope that helps

  6. guht
    Member
    Posted 9 years ago #

    Was this problem ever resolved? I am having the same problem.

    function get_alloptions() {
    global $wpdb, $wp_queries;
    $wpdb->hide_errors();
    if (!$options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'")) {
    $options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options");
    }
    $wpdb->show_errors();

    foreach ($options as $option) {
    // "When trying to design a foolproof system,
    // never underestimate the ingenuity of the fools :)" -- Dougal
    if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
    if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
    if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
    @ $value = unserialize($option->option_value);
    if ($value === FALSE)
    $value = $option->option_value;
    $all_options->{$option->option_name} = apply_filters('pre_option_' . $option->option_name, $value);
    }
    return apply_filters('all_options', $all_options);
    }

    The line it complains about is the foreach statement..

  7. anthem501
    Member
    Posted 9 years ago #

    First of all, sorry about replying so late, I've been so busy lately that I completely forgot to check WP.org.

    I've tried your lille fix, Nicko, but I'm still getting the exact same errors. It seems it can't create the tables in the database. I've talked to my host, and they can't seem to figure out what the problem is either. They did, however, tell me that they are running IIS6.0, which could be why I cannot install it.

    Would any of you happen to know a workaround for IIS(6.0)? It seems WordPress runs best (or only at) all other webservers but IIS, or am I wrong here?

    Coldforged, the provided information with the databasename, user+password in the config.php is correct, the host even doublechecked it just incase I had filled it out wrong.

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

    That error (the one in the OP) typically occurs on Upgrade, NOT install.

    Are you certain that prior to running install there are no tables in the database at all ?

  9. anthem501
    Member
    Posted 9 years ago #

    podz, positive. There are no tables in the database at all. I even tried deleting the database and creating a new one to make sure nothing was conflicting, didn't help though.

  10. GreenRedBrownell
    Member
    Posted 9 years ago #

    I can't help with the "foreach" error, but the problem with it not finding tables is a chicken/egg kind of thing that happens to lots of people on their first install. You can usually IGNORE those warnings if you haven't actually done the install yet!!!

    It took me days to figure out that the tables do not get created until you go through Steps 1 and 2 of the install process. So, if at the bottom of the page you see the standard text to start Step 1, just try it. Very often, it sets up the data base just fine, and you're on your way... if it doesn't work, you may have to delete your data base and start over, but that shouldn't be so hard, eh??

    Good luck....

    -- Green

  11. anthem501
    Member
    Posted 9 years ago #

    GreenRedBrownell, thanks for replying.

    I've already tried what you are suggesting, it doesn't work for me. At the bottom of Step 1 and 2, I get the dialog boxes and fill them out, but the tables doesn't not get created in my database at all. Deleting the database and establishing a new one does not help either, I really have no idea how to fix this, 'cause I really wanna use WordPress. :(

  12. GreenRedBrownell
    Member
    Posted 9 years ago #

    OK, then it looks like you are going to have to alter the script to print out the contents of "$options" (immediately before the "foreach") and "$option" (during each iteration of the "foreach"), so that someone might have a clue what the issue is.

    Otherwise, you might try to old "wipe it clean" and reinstall, then reupload, all the WP files trick. It's tedious, but it tends to catch weird problems created by a missing file, or a corrupted file, etc.

    Good luck, and let us know how it goes....

  13. Bencn
    Member
    Posted 9 years ago #

    I had similar errors,in Windows2003 IIS+PHP+Mysql, first install.
    I IGNORE those warnings and go through Steps 1 and 2 of the install process,install ok,login,go options,set and update,it's work^_^

    and see this:

    CREATE TABLE IF NOT EXISTS <strong>DB_NAME</strong>_options (
    option_id bigint(20) NOT NULL auto_increment,
    blog_id int(11) NOT NULL default '0',
    option_name varchar(64) NOT NULL default '',
    option_can_override enum('Y','N') NOT NULL default 'Y',
    option_type int(11) NOT NULL default '1',
    option_value longtext NOT NULL,
    option_width int(11) NOT NULL default '20',
    option_height int(11) NOT NULL default '8',
    option_description tinytext NOT NULL,
    option_admin_level int(11) NOT NULL default '1',
    autoload enum('yes','no') NOT NULL default 'yes',
    PRIMARY KEY (option_id,blog_id,option_name),
    KEY option_name (option_name)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=70 ;

    Hope that helps

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.