Fatal error: Call to undefined function get_userdata() …… /wp-includes/capabilities.php on line 488

WordPress 3.1.1 site was down with error

Error establishing a database connection.

Checking the server logs showed memory errors

[Fri Apr 15 18:03:41 2011] [error] [client xxx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……/public_html/index.php, referer: http://www.google.ro/url?………
[Fri Apr 15 18:03:20 2011] [error] [client xx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……./public_html/index.php
[Fri Apr 15 18:03:20 2011]  [error] [client xx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……./public_html/index.php
[Fri Apr 15 18:03:20 2011] [error] [client xx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……./public_html/index.php

A reboot of the VPS cleared the memory error however this error appeared in it’s place

Fatal error: Call to undefined function get_userdata() …… /wp-includes/capabilities.php on line 488

A repair of the mysql database didn’t fix this problem. Googling the error didn’t come back with anything useful either.

Testing with another browser allowed most pages to come up without this error so it appeared to be something to do with the other browser having a cookie for the admin user which corresponds to the error about get_userdata.

Deleting the admin user (the only one) from the wp_users table allowed both browsers to view the site.

Recreating the user with the same user_pass and other details allowed both browsers to view the site so there was a problem with the wp_users table preventing the site from operating.

Leave a comment

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

I agree to these terms.