LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   [solved] json error with zencart 1.5 eventhough json installed (http://www.litespeedtech.com/support/forum/showthread.php?t=5739)

bangsters 02-29-2012 08:12 AM

[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

webizen 02-29-2012 10:16 AM

do following at command line and paste the result here
Quote:

/usr/local/lsws/fcgi-bin/lsphp5 -i| grep json

bangsters 02-29-2012 10:41 AM

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'

webizen 02-29-2012 12:57 PM

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.

bangsters 02-29-2012 01:16 PM

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 :)

webizen 03-01-2012 11:44 AM

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]

bangsters 03-03-2012 07:14 AM

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.


All times are GMT -7. The time now is 05:20 AM.