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

Hi All, I have an interesting problem.

When I attempt to run a .php script from the command line, I get this error:


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

I’ve done some research, and read that I should remove the line:


extension=json.so

From php.ini. Problem is, I don’t have root access to the server, so I can’t remove or comment out the “extension=json.so” line.

I just ran a php version command, and got this:


> php -v
PHP Warning:  Module 'json' already loaded in Unknown on line 0
PHP 5.2.1 (cli) (built: Nov 28 2007 23:14:55)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Any thoughts on how I can get rid of the error without root access? TIA.

You might still be able to edit the php.ini file depending on what file permissions it has.

If not, you could execute php and set the path to your own php.ini file


php -c /path/to/your/php.ini -f /path/to/script_to_run.php

http://www.php.net/features.commandline

I think I would prefer just executing php with my own php.ini file anyway, so config only changes when I want it to.

thanks crmalibu. that works when i run it manually. ultimately i need the php script to be run from a shell script, so i guess i can add the custom path to the script.