Ready to get started?Download WordPress


Installation Problems: Fatal error: Call to undefined function: get_bloginfo() (65 posts)

  1. tosiabunio
    Posted 9 years ago #

    As far as I was able to reproduce that problem it is related to conflicts between PHP code and the database. If I access the local database as root without password everything works fine but when I try to use other defined user with password then I get that error. At this moment WP works for me only for root user without password.

  2. Sokrates
    Posted 9 years ago #

    I made the classic error of doing an upgrade when very tired (2am!).

    I also got the error

    "Installation Problems: Fatal error: Call to undefined function: get_bloginfo()"

    I had simply forgotten to run the ..\ wp-admin\upgrade.php page after uploading the new files. Doh!

  3. toddorado
    Posted 9 years ago #

    I have this exact problem, but the error occurs when I'm *trying* to run wp-admin/upgrade.php - the 'simple' upgrade instructions are tremendously misleading, so I went to the detailed instrux. I've changed the wp-config-sample.php to wp-config.php and ensured that all data is correct, but receive this error on line 304 when going to wp-admin/upgrade.php. What am I missing?

  4. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    You will trip over this bug if you are having database connection problems. You can simply remove line 304 of wp-db.php, which looks like this:

    header( 'Content-Type: ' . get_bloginfo('html_type') . '; charset=' . get_bloginfo('charset') );

    With that line gone you will be able to see the real error message. Details here.

  5. toddorado
    Posted 9 years ago #

    Thanks! That did it.

  6. ahearn
    Posted 9 years ago #

    I'm a new user, clean install, and have the same problem. Like others, have checked the wp-config file for correct database name, host (localhost), etc.

    I deleted line 304 in wp-db.php and now see the "real" error msg, but am no closer to a solution.

    Does anyone have a solution other than installing a back-level version and converting?

  7. ahearn
    Posted 9 years ago #

    OK, problem solved, at least in my case.

    I had missed the step of granting permissions to my database user. This is fairly easy to miss when using PHP CPANEL because it looks like default permissions have already been granted. But the "Grant Permissions" button must be clicked to actually apply the permissions. It had been a while since I had done this, and therefore missed it.

    I hope this might help some others who are having this problem.

  8. Chris
    Posted 9 years ago #

    I got this error too, but it was because I forgot to run "Flush Privileges" after I added the db user.

    Just remember that if you're setting up the user manually and you have this error. I hope they make this error clearer in future versions.

  9. sergio
    Posted 9 years ago #

    I solved the problem by replacing 'localhost' with the IP address of mySQL server.

  10. johnnycannuk
    Posted 9 years ago #

    Sorry guys, I've tried everything, but I still get the error.

    I'm running WP 1.5.1 with MySQL 4.1.11, on Apache 1.3.33 with PHP 4.3.11 installed. On Win XP pro. I have checked my user(s) via the MySQL commandline and I can log in fine, but 1.5.1 can seem to log in unless I go in as root, with no password to localhost.

    I have tried replacing 'localhost' with '' and 'mymachine name' and '' but to no avail. I've made changes and restarted Apache...

    So, I'm stumped. A MySQL setup issue?

  11. escape
    Posted 9 years ago #

    The same error kept me trying out everything for hours. Finally found out that there was a compatibility issue with password hashing between php and mysql. According to some newsgroups it's not very clear which version combinations of php and mysql cause the password problem.

    Try this. Login to mysql as root and set your mysql-password with the OLD_PASSWORD option like this:

    SET PASSWORD FOR 'databaseuser'@'localhost' = OLD_PASSWORD('databasepassword');

    In case you didn't know how to create a database and a user beforehand, you can use these 2 commands within mysql first after loging in as root:

    CREATE DATABASE databasename;
    .* TO 'databaseuser'@'localhost';

    It worked for me and I hope it will for you.
    Good luck & peace!

  12. johnnycannuk
    Posted 9 years ago #

    No luck so far again. I did a clean install of all three apps and now can even connect as root (although this version is running as a windows service and root has a password) . Once again I expect this may be a mysql error or even php, but since I don;t get detailed errors I don;t know.


  13. johnnycannuk
    Posted 9 years ago #

    Ok, the wierdness continues. I managed to get the second instance (on a different box), but I don't know why...I tried changing some things, but it didn't work. I tried installing MySQL 4.0.24, which installed but I never ran.

    Then, bang, I ran the script and it worked. I have know idea what I did. I also can't repeat it on my other box (I even installed, but did not configure the earlier version of MySQL again).

    I've restarted everything but it can't get to the db...although I can log in as that user from the MySQL admin...

    Have you guys considered porting to Postgres? ;-)

    Any other help (like where to find detailed log messages in either MySQL or PHP) so I can figure this out would be a help.

  14. escape
    Posted 9 years ago #

    hey, johnnycannuk, have you tried the old_password option? Your situation really calls for this, I guess. With earlier versions of MySQL there was another way to handle passwords. It only takes one statement in MySQL to change to old_password mode. See my earlier post just before your last 2 posts.

  15. sevenupcan
    Posted 9 years ago #

    Yes this was the same for me, eg either using mysql228.fasthost.co.uk or Seems like the 99% has now become more like 90%. lol

  16. johnnycannuk
    Posted 9 years ago #


    Thanks, that did it!

    Now, someone update the wiki with this quick.

  17. Dabbler
    Posted 9 years ago #

    Make sure you can connect to your database using phpMyAdmin or MySQL Query Browser.
    Check the values of your siteurl and home columns in the wp_options table of your database. If they aren't set right the php include files can't be loaded.

  18. anoldredbarn
    Posted 9 years ago #

    Happened to me too on a fresh install. I did everything right, created the database, amended wp-config.php, but got the same get_bloginfo() error.

    I finally noticed, in the my_sql doc, a mention of the recommended 6-8 character user password. (Can it be that simple?)

    So I reduced my password from a fifteen character phrase to seven characters, amended wp-config.php, and fired the install script. A second or so later, the WordPress intro page filled my browser.

    Hope it's that easy for you.

  19. mktwst
    Posted 9 years ago #

    I got this - I put the wrong username in.

  20. olsoma
    Posted 9 years ago #

    THANK YOU VERY MUCH for the old_password step. I had been beating my head against a WordPress-shaped wall for two days before I tried that.

    For future reference, I am running Win2K3 Server/IIS6/PHP 4.3.11/MySQL 4.1.12.

    Running this combination of versions will run you smack dab into the password matching issue.

    Thanks again!

  21. harvestmoon
    Posted 9 years ago #

    And then there are those of us who put the definitions in the wrong place in the config file. Just wanted to add this incase someone else did the same thing.

    I put the database name where it says DB_NAME instead of database_name.

    Just a thought.

    STill isn't working for me though - same fatal error...

  22. moshu
    Posted 9 years ago #

    If you read the whole thread there was a solution posted above.

  23. harvestmoon
    Posted 9 years ago #

    Ok, if you use nearlyfreespeech.net as your host, the database is the database name and the localhost is your Sql process name. Install is working now!!!!

    (dances a bit)

  24. puterfixer
    Posted 9 years ago #

    This is the error message displayed on my blog when the webhost's MySQL server was taken offline temporarily and the database was not accessible. It wasn't related to any of the files, the blog was working just fine at one moment then suddenly started displaying this error. A few minutes later, when MySQL resumed working, everything was fixed without my intervention. I hope this helps; my conclusion is that the error may indicate that the MySQL database is unavailable.

  25. whit
    Posted 9 years ago #

    Yup, the instructions for the quick install don't mention creating the database, such as with "mysqladmin -u user -ppassword create databasename"

  26. tainsd
    Posted 9 years ago #

    I struggled with this for three days, thanks for those here who have offered help. Here's what worked for me. I did remove line 304 of wp-db.php and then got better error messages. My system was adding my system id, stopdebt, to my database and user id. So instead of wordpress my date base name was actually stopdebt_wordpress, and the same, stopdebt_username, for the username. I hope this helps someone.

  27. iBrent
    Posted 9 years ago #

    How do you find your local host number... lol

  28. RussB
    Posted 9 years ago #

    I have the same problem. I cannot get it to work. I have changed everything multiple times. Here is what I have for a DB:

    Users in blog
    jrbarn32_blog (Privileges: ALL PRIVILEGES)

    Connection Strings
    Perl $dbh = DBI->connect("DBI:mysql:jrbarn32_blog:localhost","jrbarn32_blog","<PASSWORD HERE>");
    PHP $dbh=mysql_connect ("localhost", "jrbarn32_blog", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("jrbarn32_blog");

    Here is what I have for a config file:

    // ** MySQL settings ** //
    define('jrbarn32_blog', 'wordpress'); // The name of the database
    define('jrbarn32_blog', 'username'); // Your MySQL username
    define('thompson01', 'password'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    /* Stop editing */

    define('ABSPATH', dirname(__FILE__).'/');

    Does not work at all and I have changed it up time and time again using IP's, root logins.. all sorts of things.. no luck.

    Any idea?

    I am using 1.5.1

  29. RussB
    Posted 9 years ago #

    Never mind.. I used 1.5 and it worked. duh...

  30. charlesarthur
    Posted 9 years ago #

    I was having the same problem (trying to set it up on my Powerbook - MySQL 4.1, PHP 4.3.1, Apache .. something. Couldn't get it to work, tried two different users.

    Then tried swapping to a different user with fewer privileges, and it worked. Can't understand it. Something perhaps about how the zip archive gets unzipped, creating rubbish characters you can't see?

    And now I just have to delete it all and work out how to upgrade from 1.2 :-)

Topic Closed

This topic has been closed to new replies.

About this Topic