Function "json_decode" does not work after PHP5 reinstall

To all,

I re-installed PHP5 on my server just to stay updated. However, after that reinstall, everywhere on my sites where I use function:

json_decode(…

Executions breaks. (It did not with the previous PHP install.)

The error i am getting is:

Fatal error: Call to undefined function json_decode() in /home/username/public/example.com/public/somefile.php on line 155

--- I have attempted the following, with following results ---

I tried sudo apt-get install php5-json

However, it did not work (please see log below)

root@lion:/# sudo apt-get install php5-json

Reading package lists… Done

Building dependency tree

Reading state information… Done

Package php5-json is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'php5-json' has no installation candidate


Has anyone ever experienced this problem before?

Can anyone help with what could be wrong? How to bring json_decode back?

1 Reply

How did you "reinstall" php5?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct