LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [solved] json error with zencart 1.5 eventhough json installed

Reply
 
Thread Tools Display Modes
  #1  
Old 02-29-2012, 08:12 AM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
Default [solved] json error with zencart 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.

I'm running PHP 5.2.17 on litespeed

Please advice.

Thank you

Last edited by NiteWave; 03-01-2012 at 08:34 PM..
Reply With Quote
  #2  
Old 02-29-2012, 10:16 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
do following at command line and paste the result here
Quote:
/usr/local/lsws/fcgi-bin/lsphp5 -i| grep json
Reply With Quote
  #3  
Old 02-29-2012, 10:41 AM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
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'
Reply With Quote
  #4  
Old 02-29-2012, 12:57 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
starting from php 5.2, json is enabled by default. (http://www.php.net/manual/en/json.installation.php). so there is no need for '--enable-json' option.

BTW, litespeed works the same way as apache on this.
Reply With Quote
  #5  
Old 02-29-2012, 01:16 PM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
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
Reply With Quote
  #6  
Old 03-01-2012, 11:44 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
try sth like
%
Quote:
RewriteCond %{HTTP_HOST} \.([0-9a-z-]+[0-9a-z]\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Reply With Quote
  #7  
Old 03-03-2012, 07:14 AM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:51 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.