Fatal Error Call To Undefined Function Json_decode Joomla
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings call to undefined function json_encode() php and policies of this site About Us Learn more about Stack Overflow
Call To Undefined Function Json_decode Centos
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation call to undefined function json_encode() ubuntu Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it yum install php5-json only takes a minute: Sign up PHP Fatal error: Call to undefined function json_decode() up vote 119 down vote favorite 24 Apache is logging PHP Fatal error: Call to undefined function json_decode(). After some googling, it seems this problem is a result of not having the latest version of php. Oddly, running php --version ouputs PHP 5.5.1-2+debphp.org~precise+2 (cli) (built: Aug 6
Php Enable Json
2013 10:49:43) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.2-dev, Copyright (c) 1999-2013, by Zend Technologies with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans Clearly showing that my php version is greater than 5.1. Any ideas as to what could cause this, or the steps to take to find out? EDIT: The result of a script echoing phpversion is 5.5.1-2+debphp.org~precise EDIT: The result of phpinfo() is also PHP Version 5.5.1-2+debphp.org~precise+2 Furthermore, in the phpinfo(), it lists the module JSON and the module authors (Omar Kilani, Scott MacVicar). php json apache ubuntu share|improve this question edited Dec 5 '13 at 18:52 asked Aug 14 '13 at 18:24 MirroredFate 4,35894070 2 Check the disable_functions ini directive to see if json_decode is in that list –Orangepill Aug 14 '13 at 18:34 Does the json module show up in your phpinfo() output? –tcmitche Aug 14 '13 at 18:38 disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_ge\ t_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, –MirroredFate Aug 14 '13 at 18:39 Ubuntu 12.04 has a package: php-services-json. Ma
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and http://serverfault.com/questions/308653/fatal-error-call-to-undefined-function-json-encode policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can call to ask a question Anybody can answer The best answers are voted up and rise to the top Fatal error: Call to undefined function json_encode() ..? up vote 1 down vote favorite 2 Im trying to use json with php and i keep getting the error PHP Fatal error: Call to undefined function json_encode() I am using php version 5.3.6 and on phpinfo(); nothing call to undefined mentions json. Any suggestions? php json share|improve this question asked Sep 6 '11 at 17:00 Jonah Katz 108114 migrated from stackoverflow.com Sep 6 '11 at 18:32 This question came from our site for professional and enthusiast programmers. Try installing: pecl.php.net/package/json –stslavik Sep 6 '11 at 17:02 @stslavik When i try installing it says ` cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5 52)` –Jonah Katz Sep 6 '11 at 17:06 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote accepted For some reason your PHP was compiled without JSON. Either: Recompile it Install a package Use a function that emulates json_encode, which can be found in the comments section of http://php.net/manual/en/function.json-encode.php share|improve this answer answered Sep 6 '11 at 17:04 Paul S. 1462 add a comment| up vote 2 down vote try in shell (assuming you are using linux), otherwise refer to phpinfo(); php -i | grep json example php -i | grep json json json support => enabled json version => 1.2.1 There is an interesting comment on the do