PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
The ZC 155 installer reports PHP 5.5 or newer is required for PCI compliancy.
The server which I have ZC 1.54 running on has PHP 5.4.26 enabled. When I change to PHP 5.5 (within cpanel), ZC 1.54 no longer works (shows blank admin pages). Switching back to PHP 5.4.26, ZC 1.54 works correctly again.
I wish to test ZC 1.55 on PHP 5.5, while ZC 1.54 is still operating for the general public.
Is there something special I need to do to allow ZC 1.54 to run on PHP 5.5 ?
And specific PHP 5.5 libraries I need to enable within cpanel?
Unfortunately phpinfo() is disabled on the server so I'm unable to access the list of PHP libraries currently enabled under PHP 5.4.26.
Thanks,
Woody
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
Is there an available list of which PHP 5.4 libs and PHP 5.5 libs are used by either ZC 1.54 or 1.55?
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
according to:
https://www.zen-cart.com/content.php...o-run-zen-cart
you should be fine.
are you getting any log errors when you get the blank login page? and is the only thing you are doing just changing php in the cpanel?
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
Quote:
Originally Posted by
carlwhat
Thanks.
I just tested switching to PHP 5.5 (from PHP 5.4 native) and then attempted to access the ZC 1.55 admin (unsucessfully).
Error that shows up in zC log is:
Code:
PHP Fatal error: Call to undefined function json_encode() in /home/myacct/public_html/mystore/myadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 81
is it likely a PHP 5.5 library required by Zen Cart is not enabled on my server?
In my cpanel, PHP native mode enables ALL available PHP 5.4 libraries on the server. But there is not PHP 5.5 native mode so I must decide which of the many PHP 5.5 libraries to enable.
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
UPDATE: In cpanel,I checked the 'json' PHP library for PHP 5.5, and that appears to have solved my issue.
Thanks for the recommend to check my logs. Dunno why I didn't do that first. Duh! ;-)
I notice 'json' is not listed as a required PHP module on the "Zen Cart specifications - Server Requirements" page.
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
glad you get it solved!
according to PHP, json is enabled by default starting with php 5.2. see:
http://www.php.net/manual/en/json.installation.php
so why you needed to add it explicitly is more an issue with your host than with the ZC server requirements page, IMHO.
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
Quote:
Originally Posted by
carlwhat
....so why you needed to add it explicitly is more an issue with your host than with the ZC server requirements page, IMHO.
Absolutely - should be 'carried over' from PHP 5.4.x to PHP 5.5.x when you switch.
When you do your next PHP upgrade (should be min PHP 5.6.x anyway now) check that all required PHP modules are actually enabled on the higher version before you commit your PHP version to the higher one. And if they are not activated on the higher version then enable them before you switch PHP versions.
Also refer to http://php.net/supported-versions.php
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
In PHP 5.4 native mode ALL available librairies are auto enabled, so it is impossible to know which are being used by apps, unless app documentation specificies.
It would be cool if ZC docs mentioned which PHP librairies should be enabled, in case something is not enabled by default or gets inadverently switched off.
Below are the PHP libraries my host makes available in PHP 5.5.9.and are enabled/disabed via cpanel). The libs marked with an asterisk (*) were enabled by default:
Code:
apcu haru mongo posix tidy
bcmath* hidef msgpack pspell timezonedb
big_int htscanner mssql quickhash trader
bitset igbinary mysql* radius translit
bz2_filter imagick* mysqli* recode uploadprogress
dba imap* ncurses rsync uri_template
dbase inotify oauth snmp uuid
dbx intl odbc soap* wddx
dom* json opcache sockets weakref
doublemetaphone ldap pdo* spl_types xdebug
eio lzf pdo_dblib ssh2 xmlreader
enchant magickwand pdo_mysql* stats xmlrpc*
ffmpeg mailparse pdo_odbc stem xmlwriter
fileinfo mbstring* pdo_pgsql stomp xrange
gd* mcrypt* pdo_sqlite sysvmsg xsl*
gender memcache pgsql sysvsem yaf
geoip* memcached phar* sysvshm zip*
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
Quote:
Originally Posted by
carlwhat
Well that doc above says it is complied in by default. But doesn't mean it will be enabled by default. Hosts running cpanel allow their customers the flexibility to enable/disable available libraries with simple check boxes. For security purposes, the host provider says it is preferred to enable only the libraries which will be used, rather than enable all of them (which is what PHP 5.4 "native mode" does).
But there is no native mode for PHP 5.5 on my host, so I had to select which libraries to enable for PHP 5.5.
Rather than trial and error checking and unchecking library boxes, documentation specifying which libs an app uses (e.g. ZC) would have been helpful.
Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)
Here's a tool I just found to check app code, which may help to see which PHP libraries are needed:
PHP CompatInfo
http://php5.laurent-laville.org/compatinfo/