Gnanendra
Gnanendra

Reputation: 31

PHP Warning: Module 'json' already loaded

While executing my PHP code in editor (Eclipse), I am getting this error:

PHP Warning: Module 'json' already loaded in Unknown on line 0.

What's the problem here, and how do I fix it?

Upvotes: 3

Views: 7924

Answers (3)

Yohanes AI
Yohanes AI

Reputation: 3621

sometimes you need to check at folder php.d (in my case at centos) than check file 20-json.ini

Upvotes: 0

cyberoot
cyberoot

Reputation: 340

Search the line extension=json.so in the php.ini and Remove or change to ;extension=json.so

Upvotes: 2

Spudley
Spudley

Reputation: 168803

What version of PHP are you running? Have you recently upgraded from an older version?

The JSON module only became a standard part of PHP in v5.2; prior to that you would have had to added the PECL JSON module into it yourself.

If you've upgraded to 5.2 or 5.3, but you've still got an old config which is trying to add the PECL JSON module, then it will conflict with the JSON module that is now built into PHP.

Try to find where you're including the PECL module and remove it. Your JSON functions should continue to work as before.

Upvotes: 3

Related Questions