Title: Call to undefined function json_last_error()
Last modified: May 21, 2017

---

# Call to undefined function json_last_error()

 *  Resolved [summatix](https://wordpress.org/support/users/summatix/)
 * (@summatix)
 * [9 years ago](https://wordpress.org/support/topic/call-to-undefined-function-json_last_error/)
 * I’ve started seeing the following errors in my error logs:
 *     ```
       PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function json_last_error() in /wp-content/plugins/wp-cerber/cerber-lab.php:106
       Stack trace:
       #0 /wp-content/plugins/wp-cerber/cerber-lab.php(66): lab_send_request(Array)
       #1 /wp-content/plugins/wp-cerber/cerber-lab.php(385): lab_api_send_request()
       #2 /wp-includes/class-wp-hook.php(298): cerber_push_lab('')
       #3 /wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
       #4 /wp-includes/plugin.php(453): WP_Hook->do_action(Array)
       #5 /wp-includes/load.php(677): do_action('shutdown')
       #6 [internal function]: shutdown_action_hook()
       #7 {main}
         thrown in /wp-content/plugins/wp-cerber/cerber-lab.php on line 106
       ```
   
 * I’m using WP Cerber 4.7.7. This has been causing some 500 errors for some requests.
 * These errors started after enabling `Cerber Lab connection -> Send malicious 
   IP addresses to the Cerber Lab`. Disabling this has resulted in the errors disappearing.
    -  This topic was modified 9 years ago by [summatix](https://wordpress.org/support/users/summatix/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [gioni](https://wordpress.org/support/users/gioni/)
 * (@gioni)
 * [9 years ago](https://wordpress.org/support/topic/call-to-undefined-function-json_last_error/#post-9152902)
 * Hi!
 * That means your PHP version is out of date or your server has a bit strange PHP
   configuration with disabled (or not installed) JSON library. What version of 
   PHP do you have on your website? You can check it here: **Tools -> Show diagnostic
   information** (link at the bootom).
 *  Thread Starter [summatix](https://wordpress.org/support/users/summatix/)
 * (@summatix)
 * [9 years ago](https://wordpress.org/support/topic/call-to-undefined-function-json_last_error/#post-9153383)
 * PHP 7.0.18 running on CentOS 7. I installed the JSON library and the problem 
   has resolved.
 * I didn’t realize that `json_last_error` was a native PHP function (I assumed 
   it was related specifically to WP Cerber because I’ve never seen it before). 
   Due to licensing conflicts the JSON library isn’t installed by default for some
   distributions.
 *  Plugin Author [gioni](https://wordpress.org/support/users/gioni/)
 * (@gioni)
 * [9 years ago](https://wordpress.org/support/topic/call-to-undefined-function-json_last_error/#post-9153493)
 * Glad to hear that. Actually, I’ve never seen PHP on CentOS without JSON library.
   I’ve been using this distro for about nine years.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Call to undefined function json_last_error()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-cerber_77a9bf.svg)
 * [WP Cerber Security, Anti-spam & Malware Scan](https://wordpress.org/plugins/wp-cerber/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cerber/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cerber/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cerber/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cerber/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cerber/reviews/)

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)

 * 3 replies
 * 2 participants
 * Last reply from: [gioni](https://wordpress.org/support/users/gioni/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/call-to-undefined-function-json_last_error/#post-9153493)
 * Status: resolved