Forums / General Questions / json error with zc 1.5 eventhough json installed

json error with zc 1.5 eventhough json installed

Started by bangsters on 29 Feb 2012, 4:29 PM · Views: 1,057

Results 1 to 5 of 5
29 Feb 2012, 4:29 PM
#1
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

json error with zc 1.5 eventhough json installed

Hi. I have a client that upgraded to zencart 1.5. In Admin login, he gets a blank page, and the debug error shows:

[29-Feb-2012 11:06:53] PHP Fatal error: Call to undefined function json_encode() in /home/domain/domain.com/html/admin/includes/init_includes/init_admin_history.php on line 34

Hi. I have checked my /etc/php.d/json.ini and have this: extension=json.so

I also checked my php compile settings and I have json in there.

Older versions of zencart appear to be working fine.

We are running PHP 5.2.17 with litespeed

Please advice.

Thank you

29 Feb 2012, 6:05 PM
#3
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

Re: json error with zc 1.5 eventhough json installed

Thanks but I already checked that page :)

i believe it's the json error, but then we are running 5.2.17 and json is built in.

29 Feb 2012, 7:17 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: json error with zc 1.5 eventhough json installed

If it's saying the function is undefined, then whatever instance of PHP your store is using doesn't have json available to it.
It would seem as though you're editing the wrong files, or if you changed settings without restarting the PHP and/or Apache processes, then the changes won't be available yet.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Feb 2012, 7:28 PM
#5
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

Re: json error with zc 1.5 eventhough json installed

Thanks!! Got it fixed. I ended up recompiliing php. Original config was --enable-json=shared. I recompiled PHP 5.2.17 and change --enable-json=shared to just --enable-json.

Weird... =enable-json=shared worked fine when we were using apache. with litespeed i'm not sure why it didn't work.