Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By PhilipF on
Trying to install Drupal 7.14 on RHEL with Apache 2.4.2 and PHP 5.3.14, but keep getting the error:
PHP Fatal error: Call to undefined function json_encode().... includes/common.inc on line 4898
Running phpinfo from the command line and through http request provides different results. On the command line it works and I see that it is using json version 1.2.1. Running it through the browser does not show json as being enabled. The configure command parameters between the two appear to match up.
Any suggestions?
Comments
Don't know about RHEL, but on
Don't know about RHEL, but on Ubuntu, there is a separate installation step using apt-get to install the json support for PHP. apt-get install php5-json, and then things work. Maybe same issue on RHEL?
Hi PhilipF, json_encode() was
Hi PhilipF,
json_encode() was removed from PHP core in 5.5 due to a licensing problem.
Are you sure you're not using 5.5?
As floydf mentioned you'll need to run the following commands on Ubuntu:
it should get back into core at some point soon though.
Hi Dan.Ashdown ,
Hi Dan.Ashdown ,
Thanks for your help. Its working fine for me.