Problem with JSON PHP extension.

  • Posted March 11, 2014

Hello, how i can install that extension? I install cURL and that’s ok… but now i need to install that. I create facebook connect on my web page. Here is link with my error :

*i send ticket for this… and i’am sorry… now i see this community.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

That did the trick… thanks.

The JSON extension is no longer included with the base php package, you need to install it separately: <pre>sudo apt-get install php5-json</pre>

What result do you get if you run this PHP snippet: <br> <br><?php <br>echo function_exists( ‘json_decode’ ); <br>?> <br> <br>The JSON extension is included by default in PHP, but just to be sure, you can verify it by looking through PHP’s info output: <br> <br><?php <br>phpinfo(); <br>?> <br>

I would try enabling the extension in your php5 config file. It might vary depending on your Linux distro and version of php you’re using. Google will surely help you.

when i do that i get this : <br> <br>Reading package lists… Done <br>Building dependency tree <br>Reading state information… Done <br>php5-common is already the newest version. <br> <br>And my error is this : <br>“Fatal error: Uncaught exception ‘Exception’ with message ‘Facebook needs the JSON PHP extension.’ in /var/www/ Stack trace: #0 /var/www/ require_once() #1 /var/www/ include(‘/var/www/stefan…’) #2 {main} thrown in /var/www/ on line 22” <br> <br> <br>

sudo apt-get install php5-common