WordPress.org

Forums

Tracking down an incredibly strange installation problem (12 posts)

  1. marcel_d
    Member
    Posted 1 year ago #

    After a few hours of screwing around trying to get wordpress to install locally, I was able to track down the problem to a single function. I need to sleep so I'm not going to get it down to a statement until later.

    Basically the problem I encountered was the install showing me an almost blank screen after submitting my title, username and password upon install.

    I'm installing locally using xampp (apache) and my database is hosted remotely, and wordpress is able to communicate with it just fine.

    What I was able to find was...
    -In the wp-admin folder, install.php calls a function called 'wp_install()' after you've submitted the requested credentials with no errors
    -wp_install() itself is located in \wp-admin\includes\upgrade.php. It makes a number of function calls, one in particular is populate_roles().
    -populate_roles() is located in \wp-admin\includes\schema.php. It calls 8 alike functions each having to do with adding 'capabilties' such as edit or administrator to a user, with the first called function being populate_roles_160().

    If I comment out populate_roles_160() the installation succeeds. I don't have the slightest clue as to why this is the case but it's very frustrating. I need a wordpress developer to help with this one.

    Leaving out that function breaks the default user's admin privileges (among other things I'm sure) so this isn't a solution, just an observation.

  2. marcel_d
    Member
    Posted 1 year ago #

    Tried the install on another computer with xampp and Win 7 64 bit...same thing. Maybe I'll try it on a webserver later...

  3. Jesin A
    Member
    Posted 1 year ago #

    Before you do a fresh install edit the wp-config-sample.php file, find

    define( 'WP_DEBUG', false );

    and change it to

    define( 'WP_DEBUG', true );

    Also edit the php.ini file, find and set display_errors to On.

    Now start the installation you may see visible errors on the screen.

  4. marcel_d
    Member
    Posted 1 year ago #

    Doesn't give me anything.

    When I reload the install page it thinks it's installed, but I'm unable to login because it fails to properly create the admin account.

  5. Jesin A
    Member
    Posted 1 year ago #

    I'm installing locally using xampp (apache) and my database is hosted remotely, and wordpress is able to communicate with it just fine.

    Are you sure?

    Is the database on the LAN or the Internet?

    Try creating a database locally and try installing WordPress.

  6. marcel_d
    Member
    Posted 1 year ago #

    Well the install is able to populate the database with all the wordpress tables without any problems. I'll see what happen with a local database.

  7. Jesin A
    Member
    Posted 1 year ago #

    In that case I think the database username doesn't have UPDATE privileges on that remote database.

    Connect to the remove DB server using the mysql command line tool and try the following queries.

    mysql> connect database wordpress;
    mysql> CREATE TABLE test(ID int, uname varchar(255));
    mysql> INSERT INTO test(ID, uname) VALUES(11, 'Bob');
    mysql> UPDATE test SET uname = 'Alice' WHERE ID = 11;
    mysql> DELETE FROM test WHERE ID = 11;

    All these queries must run successfully.

  8. marcel_d
    Member
    Posted 1 year ago #

    All those queries work from command line. The only difference is that my database isn't called wordpress. Is that a problem?

  9. marcel_d
    Member
    Posted 1 year ago #

    Well it installs properly onto my local database...this is perplexing.

  10. Jesin A
    Member
    Posted 1 year ago #

    When logging in from the command line did you use the same database username/password as you used with WordPress?

    Maybe you are missing a few WordPress files try downloading a fresh installation - http://wordpress.org/latest.zip

  11. marcel_d
    Member
    Posted 1 year ago #

    Yeah same credentials and everything. The same wordpress files that failed with the remote database worked with the local one, so I think my files are all there.

    Perhaps its time to change hosts. The database is currently on godaddy.com

  12. Jesin A
    Member
    Posted 1 year ago #

    Why not try exporting your local database and importing it to GoDaddy.

    Use the mysqldump command.

    mysqldump -u localusername -p local_db_name > wordpress.sql

    Then import it.

    mysql -u godaddyusername -h godaddy_sql_host -p remote_db_name < wordpress.sql

Topic Closed

This topic has been closed to new replies.

About this Topic