Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Warning: Module 'json' already loaded

Tags:

php

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?

like image 806
Gnanendra Avatar asked Dec 22 '25 07:12

Gnanendra


2 Answers

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.

like image 180
Spudley Avatar answered Dec 23 '25 19:12

Spudley


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

like image 28
cyberoot Avatar answered Dec 23 '25 20:12

cyberoot