WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function: is_admin() "What the (31 posts)

  1. b1gft
    Member
    Posted 4 years ago #

    I posted a problem a couple of hours ago about not being able to update, but it now has gone more serious.
    when I type in to my site, http://www.salesd.com the following line comes up,

    Fatal error: Call to undefined function: is_admin() in /home/www/salesd.com/wp-includes/vars.php on line 16

    Can you tell me what to do, I think I have to go into some file, (Which one) and change something on line 16.

    Can you point me in the right direction. I can not get into the admin section so I have to do it through the control panel.

    Please help, to much work gone into this site, to lose it.

  2. alism
    Member
    Posted 4 years ago #

    Relax. Deep breath.

    Use FTP and follow the manual upgrade process. Read carefully and take it slow if you've never done it before.

    http://wordpress.org/download/
    http://codex.wordpress.org/Upgrading_WordPress

  3. b1gft
    Member
    Posted 4 years ago #

    But what about my site which is now gone. Is all my months of work gone.

    Dont mention back up my hosting company said they back up everything, and now they are stalling.

  4. alism
    Member
    Posted 4 years ago #

    Don't panic. The posts themselves will be stored in your sql database. Images and any other media that you've upload should be in your wp-content folder, along with your plugins and themes. As long as you leave all of those (and your wp-config.php file) well alone, you should be fine.

    Or just wait and see what your host comes back with.

  5. b1gft
    Member
    Posted 4 years ago #

    Are you saying to manually update the script. Will the problem not be still there. Will, what ever line they tell me, I having trouble with, will I not still have trouble with that line.
    Do I not have to clear something from it

  6. alism
    Member
    Posted 4 years ago #

    Yes, manually reupload the core WordPress files. It sounds like it didn't happen properly first time with the automatic upgrade, so best just to do it again yourself to fix whatever files are missing/corrupted/whatever from the first attempt.

  7. sabinou
    Member
    Posted 4 years ago #

    If it can help, B1gft, I'll make it clear :

    - you only need to preserve the /wp-content/ and /wp-config.php folder and file
    - everything else can be removed and reuploaded as many times as you wish
    - your data isn't at risk, it is safely stored elsewhere, in your host's database server

  8. b1gft
    Member
    Posted 4 years ago #

    This is what my host said to me, I dont know why they could not put the back up copy on, they said it did not fix the problem.

    Once you download that,(wordpress) uzip it, access the wp-content/themes and remove all themes folders. Then return to the main directory, select all files and folders and upload them to your site using ftp.
    If you are unable to handle this, I would suggest you to hire someone to help you.

    Do you agree with what they are saying.

  9. jriggs
    Member
    Posted 4 years ago #

    I had the same problem as OP.

    I backed everything up and did the manual install and Im still getting the same error mentioned above.

    What's going on guys?

    *follow up

    OK crisis averted...I rolled back to 2.86 and I'm back online. Since I'm not the only one with this problem I have to recommend against updating.

  10. b1gft
    Member
    Posted 4 years ago #

    Jriggs did you do excactly as my host said to do, did you leave out the
    themes folder

  11. jriggs
    Member
    Posted 4 years ago #

    No. I downloaded 2.8.6 from here
    http://wordpress.org/download/release-archive/
    and copied my original config, theme, plugin and settings files and my site started working again.

  12. tokyomonster
    Member
    Posted 4 years ago #

    I work at a webhosting company and had a customer with this issue, it popped up shortly after upgrading to 2.9.

    Not sure what caused it, but a manual reinstall, as previously instructed, and using the latest stable(2.9), fixed the issue.

    At first I tried just copying the vars.php and that was no help.

    So, here's pretty much exactly what I did:

    Moved wp-content and wp-config.php to a safe location. Unzipped the latest.zip obtained from http://wordpress.org/download into their public_html, copied wp-config.php and wp-content back over into public_html as well.

    Once that was done, the site started working as it should. YMMV.

  13. jalanbk
    Member
    Posted 4 years ago #

    I also encountered same problem

    and Manual upload of files solved the problem, and I am upgraded to 2.9 now....

  14. b1gft
    Member
    Posted 4 years ago #

    Do I have to delete the old wordpress files, before I upload the new files.
    The problem is I dont want to lose any thing on the site.

  15. ricoslist
    Member
    Posted 4 years ago #

    I think this is a bigger issue.

    A manual (re)install does solve this error message, but NOT if running multiple wordpress installs as individual domains, but as a sub-domain of a primary web hosting account.

    I run wordpress on my blog, which is its own domain (www.blognamehere.com)

    My web host allows me to run other domains (www.websitenamehere.com) under the same hosting accounting account, although officially they are subdomains of my primary account (www.blognamehere.com).

    Orginally I used simplescript to upgrade all of my wordpress installs; the primary account domain (www.blognamehere.com) upgraded fine, no breaks; but auto-upgrading http://www.websitenamehere.com fronm 2.9.b to 2.9 repeatedly resulted in the error "Call to undefined function is_admin() in /home/blognamehere/public_html/wp-includes/vars.php on line 16."

    not that excited about doing a manual install, i instead decided to do a totally new, clean install of 2.9 in websitenamehere.com's directory; clean install was fine until i imported orginal mysql db into new install/db - once again could not shake the error message "Call to undefined function is_admin() in /home/blognamehere/public_html/wp-includes/vars.php on line 16."

    i then followed in painstaking detail the instructions on this thread to manually upgrade websitenamehere.com; including as usual changing in that directory the memory limit in wp-settings.php (from 32 mb to 128 mb).

    result: websitenamehere.com is now running 2.9 and seems to run fine.

    HOWEVER - that then broke the already upgraded (and working fine) 2.9 wordpress install in my primary domain (blognamehere.com), with the same error message: "Call to undefined function is_admin() in /home/blognamehere/public_html/wp-includes/vars.php on line 16."

    i then manually upgraded blognamehere.com; which now works ONLY if the wp-settings.php memmory limit in that (primary) directory remains at 32 mb; and breaks again if that wp-settings memory limit is increased beyond 32 mb.

    Prior to the upgrade from 2.9b to 2.9, the wp-settings.php file in all my domain directories (primary, and add on domains running as subs of the primary) were set to a memory limit of 128 mb memory - and all ran fine.

    Unfortunately I need to be able to set all wp-settings.php memory limits to 128 mb in order to maintain functionality of each wordpress installs' individual plugins.

    Any suggestions/thoughts, and/or is there a workaround for the apparent restrictions on increasing the memory limit above 32mb in the primary wp-settings.php directory?

    Thank you.

  16. pluto459
    Member
    Posted 4 years ago #

    Deff a 2.9 issue.

    The mem limit sounds like that could be the issue and is a real bug. Just started a fresh install as test site and no prob with 2.8.6 and upgraded and used the built in video add function built into the theme and got the error.

    Guess not good idea to upgrade yet.

    OH, depends on your host on the mem limit if you can raise it. Most shared hosts have it set to 64mg limit. You can see what your is in you php.ini file. If you have cpanel use the php.ini quick config icon to see what its set to, more then likely you wont be able to raise it.

  17. pluto459
    Member
    Posted 4 years ago #

    WOW be very careful on manually updating to fix this.

    It just wiped my whole database. luckily was a fresh test site or I would be really mad.

    BACKUP THE DATABASE FIRST!!!

  18. ricoslist
    Member
    Posted 4 years ago #

    Yes, absolutely back up the database first - if i hadn't, i'd be crying right now.

    My webhost doesn't limit the mem setting; and i've happily run wp-2.7 - 2.9b with the mem limit set at 128; worked just fine.

    The really strange aspect to me is my add-on domain http://www.websitenamehere.com *requires* more than 32mb, and is actually running fine with a mem limit = 128 in the wp-settings.php in its directory (for http://www.websitenamehere.com) - I keep waiting for the add on site to break because of mem limit=32 in the primary domain directory being the only setting that works; and yes, I've tried 64m, 92m, 128m - anything over 32m in the primary wp-settings.php file breaks that site, and all the sub sites.

  19. pluto459
    Member
    Posted 4 years ago #

    I think the whole issue is the auto-upgrade. Like the error in 2.8.3

    I run 40 wp sites and have never had to adjust any mem limit. The only time I see a mem limit uissue is when building a sitemap on a huge site and that plugin needs more to finish.

    The only reason why I even triggered this error was the theme was trying to import a video, so depends on your theme and plugins.

  20. ricoslist
    Member
    Posted 4 years ago #

    ok. i just now manually reinstalled *everything* yet again - still have the same issue re: any mem limit over 32m in the primary domain folder's wp-settings.php file breaks all of my wordpress sites - including the primary domain.

    if this is a bug - what is the correct escalation path to alert the dev team to this issue?

    thank you....!

  21. portent
    Member
    Posted 4 years ago #

    This function is in wp_settings.php. I had the same problem because I hadn't copied that file over. As soon as I did, it fixed it..

    [signature removed]

  22. mandyjill
    Member
    Posted 4 years ago #

    Thanks Portent. I had my blog hacked and re-uploaded the wp-includes file but still had the same error thrown as the original poster. So I followed your advice and uploaded the wp_settings.php file for ver. 2.9 and now I'm back online (hopefully for good....)

  23. pluto459
    Member
    Posted 4 years ago #

    ya the wp-settings.php file.
    just wiped my whole site that I just spent 3 hours building.

    WP 2.9 and upgrade really sucks, they really need to fix this

  24. antiresearch
    Member
    Posted 4 years ago #

    And I just wiped mine. That was some hard work there.

    Please, please fix this.

  25. superflippy
    Member
    Posted 4 years ago #

    I just managed to get myself out of this problem. Still not sure why it worked, but here's what I did:

    While using auto-upgrade, I got the "Fatal error: Call to undefined function: is_admin()" message.
    Tried to roll back, but couldn't get my backups to unzip properly. So...
    I went back to the error page and hit my browser's back button.
    Instead of the previous upgrade page, I got a page with an "upgrade your database" button. I clicked the button.
    It took me back to my admin pages with a warning at the top to get rid of extra files from an old installation. I clicked on the link to do that.
    The upgrade page reloaded, said I was done. And my blog seems to be working again, and upgraded!

  26. antistandard
    Member
    Posted 4 years ago #

    Hey everyone,

    I had the same problem and fixed it this way:

    1. I get the error about memory limit when I am trying to auto upgrade a commerce plugin.

    2. I went into wp-settings.php and changed 32 to 64

    3. i get the 'Fatal error: Call to undefined function: is_admin()' error and I can't get into the site on any page and the sky goes dark and I hate wordpress.

    4. I read this thread and decide to not get too dramatic just yet, so I manually download wp 2.9.1 and copy across the files : wp-setings.php and vars.php to my site that is down.

    5. Now it is back up and running again. So I recommend just trying this first before you backup databases, content folders etc.

    Thanks for this thread, it helped me out. Help bloggers rule.

    WordPress dev team - dudes, seriously, how can you release even such a minor update and have it break heaps of peoples sites. It makes us loose faith. Less updates, more stability I say. WordPress is flippn awesome but when something goes wrong the whole wordpress structure goes to hell. Less updates, more stability please.

    Thank you

  27. solesirius
    Member
    Posted 4 years ago #

    I just had the same error, and antistandard solution worked for me. Now that my site is up and running again i ran into another problem. None of the images i added to my post are loading. any idea why?

  28. cjacques
    Member
    Posted 4 years ago #

    I did what others have said to do on this page - I copied the original wp-content folder and wp-config.php and installed wordpress (2.9.1) onto my computer. I uploaded the new installation of wordpress onto my domain and then copied the original content folder and wp-config.php file... my site ran, but it was blank. Should I have backed up the database, too? I'm guessing that's what the problem is.
    Sorry if I'm an annoying newb...

  29. Mike Corso
    Member
    Posted 4 years ago #

    I did what Antistandard suggested and got my site back up (says I'm running 2.9.2 even though I'm using those two files from 2.9.1.

    Specifically, I did:

    4. ..... I manually download wp 2.9.1 and copy across the files : wp-setings.php and vars.php to my site that is down.

    5. Now it is back up and running again. So I recommend just trying this first before you backup databases, content folders etc.

    Thanks,

    [signature removed]

  30. alanjcastonguay
    Member
    Posted 4 years ago #

    I hit this same issue while upgrading from 2.8.ish to 2.9.2.

    Problem was specifically a bad upload of wp-settings.php -- the old version of the file was still on the FTP server, and did not contain a definition of is_admin(). The new version of that file does have is_admin() defined.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.