WordPress.org

Forums

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

  1. jp_css
    Member
    Posted 10 years ago #

    I have uploaded and deleted everything to the web server several times, so I know everything is there. I am using version 1.5.1.

    I get the php error message: Fatal error: Call to undefined function: get_bloginfo() <snipped path>wp-includes/wp-db.php on line 304. I checked out the file wp-db.php and don't understand what could be the problem.

    It might be good to note that I am installing in a subdomain, if that could make any difference.

  2. Kafkaesqui

    Posted 10 years ago #

    get_bloginfo() resides in wp-includes/template-functions-general.php. Do you have this file, and is it up-to-date?

  3. os
    Member
    Posted 10 years ago #

    yeah, I get this too..
    the system is openBSD 3.5, PHP Version 4.3.5RC3

    Other than apache being chrooted, I cant think of anything "special" with the configuration, php & mysqld seems to be working fine..

  4. os
    Member
    Posted 10 years ago #

    Kafkaesqui: yeah, its there:

    $ cd wp
    $ grep -Rl 'get_bloginfo' *
    wp-admin/post.php
    wp-blog-header.php
    wp-includes/template-functions-general.php
    wp-includes/wp-db.php
    wp-includes/functions.php
    wp-includes/feed-functions.php
    wp-links-opml.php
    wp-login.php
    wp-register.php
    $

  5. jp_css
    Member
    Posted 10 years ago #

    Yes, I did a grep on the files to find where the function was. The file does exist and the function is there. I am still playing around with some things, but still need some ideas.

  6. iand
    Member
    Posted 10 years ago #

    I got that error, I reverted back to 1.5 files, turned off all plugins, went back to 1.5.1, hit upgrade and all is good.

  7. jp_css
    Member
    Posted 10 years ago #

    Ok, I have uploaded 1.5 before on another domain. I will try doing what you said since I was considering it before.

  8. jp_css
    Member
    Posted 10 years ago #

    Well, I have another question. Does anyone have a link to the 1.5 release. I don't seem to have the old package.

  9. Ming
    Member
    Posted 10 years ago #

    http://static.wordpress.org/archive/ contains old releases. It doesn't have 1.5 there yet. Hopefully it will soon.

  10. iand
    Member
    Posted 10 years ago #

    e-mail? I can send you the tar.gz version (i don't have the zip)

  11. Kafkaesqui

    Posted 10 years ago #

    Hit the contact link on my site, and I'll get you the zip.

  12. jp_css
    Member
    Posted 10 years ago #

    Kafkaesqui, I sent you an email but I got a reply back that it wasn't able to send it because your box is full.

  13. jp_css
    Member
    Posted 10 years ago #

    Anyway, Ian or Kafkaesqui, why don't you send me the tar or zip to <snipped>. (I will only keep the email up until I receive the file to avoid spam).

  14. jp_css
    Member
    Posted 10 years ago #

    Ok, nevermind everyone. I seemed to have finally got it to work. For some reason I had a minor error in the wp-config.php file. I don't know why it didn't give me an error saying the information was incorrect, but fixing that seemed to make things work (unless I did something differently this time I don't know about).

  15. Kafkaesqui

    Posted 10 years ago #

    Too bad I didn't visit the forums before emailing it off. ;)

  16. johnkoontz
    Member
    Posted 10 years ago #

    What did you do to fix it? I have the same problem.

  17. johnkoontz
    Member
    Posted 10 years ago #

    Anyone willing to email me the 1.5 version?

  18. Jark
    Member
    Posted 10 years ago #

    i ran into the same problem and ended up copying over a config from a known good install to this new install and it works now.

  19. johnkoontz
    Member
    Posted 10 years ago #

    Can you post the config (commenting out the sensitive info)?

  20. big_ipaq
    Member
    Posted 10 years ago #

    I have the same error and nowhere to download and install previous version from. Any idea?

  21. Kafkaesqui

    Posted 10 years ago #

    I've placed the zip of 1.5 online for those who need it:
    http://guff.szub.net/downloads/wordpress-1.5-strayhorn.zip

    This will be removed when 1.5 appears in
    http://static.wordpress.org/archive/

  22. big_ipaq
    Member
    Posted 10 years ago #

    Thanks!

  23. sevenupcan
    Member
    Posted 10 years ago #

    Did anyone find out what was causing this? I have exactly the same error.

    Fatal error: Call to undefined function: get_bloginfo() in /<snipped path>/wp-includes/wp-db.php on line 304

    This is my first time using WordPress, so it is a clean install, using the latest version first which i downlaoded today.

    All infromation seems to be entered correctly into the config file.

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'database_name'); // The name of the database
    define('DB_USER', 'database_username'); // Your MySQL username
    define('DB_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__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    The only settings i changed was, the database name (i take it this does not mean the database domain name?), the mysql username and the mysql username password.

    Does anyone know where i might be going wrong?

    Thank-you for your time

  24. synewaves
    Member
    Posted 10 years ago #

    This problem (in my case) was caused by invalid database parameters.

    WordPress creates a db object at the time of page load. This happens in wp-settings.php and occurs before the wp-includes/template-functions-general.php file is loaded (where the get_bloginfo() function is defined).

    If the db object cannot connect to the database, it calls a bail() method which tries to call get_bloginfo().. but it's not included yet.

    Check your DB connection parameters to ensure they are correct and that the database is accessible.

    I suggest fixing this in newer versions of WP by adding a call to function_exists('get_bloginfo') in the bail method.

  25. kylemaxwell
    Member
    Posted 10 years ago #

    I'm having this problem too and I think it may be due to a database outage on my site. synewaves, so I'm understanding that if the DB is down, this is the message we would see?

  26. sevenupcan
    Member
    Posted 10 years ago #

    Thanks for your reply. Something fishy about the config file, perhaps it's just me (human error) but I'm pretty sure all the values were filled correctly.

    What happened was, i thought perhaps I might be that one percent that needed to put the DB_HOST in so i tried using the db host name, but still that didn't work, so I tried the db ip, but still that didn't work.

    So then i thought i would try the database interface /wp-admin/setup-config.php but that wouldn't load, something about not having the right permissions, so i changed them to every possible permissions combination, well not all, but a lot. But that didn't seem to work. So i changed them back to how they were.

    Then i decided to do a clean install even though i was sure all the files has been transfered and not altered apart from the ones i had touched. Still using the DB_HOST value of "localhost" and that didn't work, but when i changed it to mysql4.hostsname.com it worked. I'm not at axpert at databased, so I'm not sure what happened.

    Thank-you for your response, now to see what other things face me! :)

  27. owlmonkey
    Member
    Posted 10 years ago #

    I had this problem on a clean install, and just discovered that I needed to 'create' the mysql database by hand before I could proceed. I was expecting it to create the database for me, but it didn't and I ended up with this cryptic error. Once the database was created, then the install finished successfully by creating the tables and initial data.

  28. vampykins
    Member
    Posted 10 years ago #

    I had the same error. And your right it had to do with the database. In my case I had created a new one thinking I had already deleted the old one and the old "username" . I deleted all of it (since there's nothing in them anyway) and created a new database THEN added a new user account to THAT database. I think the username I chose wasn't "connected" to the database I was using. It was calling up air! So make sure your user account is actually added to the database your using. Hope this helps.

  29. dubyah
    Member
    Posted 10 years ago #

    I have a clean install of 1.5.1 and wp-config as:

    define('DB_NAME', 'pennyblogdb'); // The name of the database
    define('DB_USER', 'bloguser'); // Your MySQL username
    define('DB_PASSWORD', '******'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    the blog addr is http://www.penny4yathoughts.com

    error message:
    Fatal error: Call to undefined function: get_bloginfo() in /home/fhlinux201/p/penny4yathoughts.com/user/htdocs/wp-includes/wp-db.php on line 304

    the mysql server info (from ISP) is as follows:
    DBNAME:pennyblogdb
    ServerName:mysql228
    IP Addr:213.171.218.228

    tried changing localhost to http://mysql228.fasthost.co.uk and http://213.171.218.228 same error.

    any ideas?

  30. dubyah
    Member
    Posted 10 years ago #

    reply from ISP identified an issue, that I don't understand... but is solved by only using the primary mySQL user and 'DB_HOST' set to just the IP addr (no http://)

    this is with UK based ISP "Fasthosts.co.uk" - thought this may help someone else one day.

Topic Closed

This topic has been closed to new replies.

About this Topic