[solved] json error with zencart 1.5 eventhough json installed

bangsters

Well-Known Member
#1
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.

I'm running PHP 5.2.17 on litespeed

Please advice.

Thank you
 
Last edited by a moderator:

bangsters

Well-Known Member
#3
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.

Now question... --enable-json=shared works fine with apache, and so does the other modules. Does litespeed work the same way? Do I need to remove the=shared on the others? My full config is:



'--with-libdir=lib64' '--with-config-file-path=/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json' '--enable-zip=shared' '--without-readline' '--with-libedit' '--enable-phar=shared' '--with-tidy=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed' '--with-mysql' '--with-curl' '--with-imap' '--with-config-file-path=/etc/conf/php/5.2.17'
 

bangsters

Well-Known Member
#5
Thanks webizen!!

offtopic, in rewriterules, if I have a subdomain, how do I remove the subdomain so I onlyhave the domain? If I use {HTTP_HOST} it shows sub.domain.com. I only need domain.com

Is that possible?

Thanks again and sorry for being offtopic :)
 

bangsters

Well-Known Member
#7
Thanks webizen!!! I was able to get it to work by using some of your suggestions :) I just had to tweak it a bit, but mostly thanks to you I figured it out

thanks again.

integration works like a charm now.

if there are other interworx users that need the same setup feel free to let me know.
 
Top