WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function (9 posts)

  1. voiceofguyana
    Member
    Posted 6 years ago #

    can't seem to find an answer to this problem
    i logged on to wp-admin and went to my dashboard then went through cpanel to do a version upgrade with fantastico, did not disable plugins and get this error when i try to do anything
    Fatal error: Call to undefined function: get_option() in /home/justice/public_html/wp-admin/admin.php on line 7

    this is the first 10 lines of admin.php
    <?php
    if ( defined('ABSPATH') )
    require_once( ABSPATH . 'wp-config.php');
    else
    require_once('../wp-config.php');

    if ( get_option('db_version') != $wp_db_version ) {
    wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));
    exit;
    }

    any ideas?

  2. MichaelH
    Member
    Posted 6 years ago #

    The function get_option is defined in the file wp-includes\functions.php so you may want to upload a clean version of that file.

    Resources:
    Uploading WordPress to a remote host

  3. voiceofguyana
    Member
    Posted 6 years ago #

    Michael ok i will try it out...what's the best source for a clean functions.php file?
    been using filezilla for a long time...love it!

  4. voiceofguyana
    Member
    Posted 6 years ago #

    no that didn't resolve the problem. same error message

  5. MichaelH
    Member
    Posted 6 years ago #

    Could be a plugin causing the problem. If you can't get access to Deactivate the plugins, then you may need to delete the actual plugins files (or folders) until you get rid of the one causing the problem.

    You might want to make a backup of your files before you start deleting them.

  6. Avram
    Member
    Posted 6 years ago #

    I'm having same problem on clean WP2.5 installation. No plugins in wp-plugins/ folder.

    I have edited admin.php and manually included (with require_once) functions.php file but then it can't recognize some other functions, so I need to include more files, and so on (without end).

  7. Avram
    Member
    Posted 6 years ago #

    I have reuploaded all files but that haven't helped. But when I've reinstalled WP everything works fine. Sorry for previous bothering post :)

  8. mechx1
    Member
    Posted 6 years ago #

    I have seen some upgrades where wp-settings.php was not upgraded, so the paths were not set up properly. You might try re-loading that file from your download

  9. phocks
    Member
    Posted 6 years ago #

    I'm thinking this must be something to do with the mysql database. It's happening to me even with a fresh install when i try to reattach my old database. Strange. I just want to be able to extract the posts and import them into a totally new wordpress install and database.

Topic Closed

This topic has been closed to new replies.

About this Topic