Forums / Installing on a Linux/Unix Server / PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

Started by woodymon on 23 Apr 2016, 11:07 PM · Views: 6,927

Results 1 to 11 of 11
23 Apr 2016, 11:07 PM
#1
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

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

24 Apr 2016, 12:11 AM
#2
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

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?

24 Apr 2016, 1:28 AM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

according to:
https://www.zen-cart.com/content.php?48-what-are-the-server-requirements-to-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?

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

24 Apr 2016, 2:49 AM
#4
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

carlwhat:

according to:
https://www.zen-cart.com/content.php?48-what-are-the-server-requirements-to-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?

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:

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.

24 Apr 2016, 3:05 AM
#5
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

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.

24 Apr 2016, 6:12 AM
#6
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

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.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

24 Apr 2016, 2:12 PM
#7
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

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

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

24 Apr 2016, 11:32 PM
#8
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

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:

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*	
24 Apr 2016, 11:45 PM
#9
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

carlwhat:

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.

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.

25 Apr 2016, 12:09 AM
#10
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

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/

25 Apr 2016, 1:27 AM
#11
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: PHP 5.4 vs 5.5 support (ZC 1.55 vs 1.54)

Woodymon:

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.

Bit of an overkill me thinks.

Woodymon:

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.

Nods in agreement :yes:

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.