WordPress.org

Ready to get started?Download WordPress

Forums

ERROR: $table_prefix (5 posts)

  1. mplummer
    Member
    Posted 5 years ago #

    Hi --
    In installing WordPress 2.7 on a Textdrive/Joyent server, I've run into a problem. I've installed WordPress many times with no problems :), but I can't figure this one out.

    Basically, I set up the wp-config.php with no problems, and the program connects happily to the database. I know this because I can alter the settings and it tells me it can't connect to the database.

    However, when I do the installation (i.e. go to http://mtplummer.com/pv/wp-admin/install.php), it returns the following error:

    ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.

    But I just have the standard 'wp_' prefix! Any thoughts?

    thanks,
    Matt

  2. MichaelH
    Member
    Posted 5 years ago #

    Start over with a new wp-config-sample.php file and edit it with a 'approved' editor (Glossary#Text editor).

  3. jebus
    Member
    Posted 5 years ago #

    I'm having this same issue after a server migration. I tried uploading a brand new wp-config.php file from two different editors (BBedit and Smultron), commenting out the $table_prefix line, deleting the line, etc. Still the same error. Anybody know what's up with that? It's the default value, 'wp_'. I'm using wp-hive, but I don't know what that would do. It seems to just be stuck on that one line.

    Thanks.

  4. Samuel B
    moderator
    Posted 5 years ago #

    @ jebus

    BBedit and Smultron

    are those Mac apps?
    Are they a basic editor like Notepad? must use a basic editor

  5. jebus
    Member
    Posted 5 years ago #

    Hey samboll,

    Yes, they're both Mac apps, and standard text editors. They're both listed in the Glossary link above.

    Turns out, that wasn't the problem. The error was coming from the database itself, specifically the wphive_hosts table. Unless you disable it, wp-hive will automatically add new hosts or IP's if they're pointed at WordPress.

    In other words, I went to load my site on the new server by it's IP address, wp-hive thought it was a new host, and added that host and the table prefix to wphive-hosts. So, I wound up with a row in wphive-hosts with an IP address in the 'host' field and '69.' in the 'prefix' field. I'm guessing that wp-hive overrode the 'table_prefix' value in wp-config.php, sending '69.' to the database function, consequently throwing that error.

    I hope that all makes sense. If anybody's seeing this error while using wp-hive, check the wphive-hosts table to see if any of the prefix values in that table contain bad characters.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic