Jump to content

Can CubeCart run on PHP 5.4?


Recommended Posts

I have installed CubeCart version 5.2.4 on a server running php 5.4


I get a blank page on both shop front and admin.


Before running the install I got the warning "Either Ioncube Loader or Zend Optimizer is required to use CubeCart 5. This can be configured after setup is complete." I expected this because ZendOptimizer does not work with php 5.4, instead you have to use ZendGuardLoader - which is installed (no version of ZendOptimizer exists for php 5.4 on the Zend website).


So, in includes/global.inc.php I changed the line $glob['encoder'] = 'ioncube'; to $glob['encoder'] = 'zend'; which then gives the following error on either shop front or admin:


Fatal error: Incompatible file format: The encoded file has format major ID 4, whereas the Loader expects 5 in /homepages/38/d487499783/htdocs/cubecart/admin_php5.3_enc_zend.php on line 0


I notice there is no 5.4. version of the 'index_php5.3_enc_zend.php' or 'admin_php5.3_enc_zend.php' files - does this mean 5.4 can't be used?


The CubeCart installation requirements say PHP Version 5.2.3+ so I assumed anything above that would be ok.


The install is for an existing CubeCart customer who has 4.4 but running on a different server. Any help out there?

Link to comment
Share on other sites

Thanks bsmither. I installed ioncube and everything is running ok.


I guess the answer to the post title is yes, CubeCart 5.2.4 will run on php 5.4 as long as you are using ioncube and not ZendGuardLoader.


Shoot that down if I have got it wrong before anybody else reads it!


Thanks again :)

Link to comment
Share on other sites

"The CubeCart installation requirements say PHP Version 5.2.3+ so I assumed anything above that would be ok."


That is essentially correct --- until it's not. For example, the developers of PHP took us by surprise when they placed a "deprecated" flag on the ereg() family of functions. That caused every CubeCart 3 store to misbehave.


The information about Zend implies that any file processed by a particular version of ZendGuard will require that same version of the loader be installed in PHP. The information also implies there must be a match between the version of the loader against the version of PHP.



PHP5.2 needs the loader for format 3 to execute *_php5.2_enc_zend.php

PHP5.3 needs the loader for format 4 to execute *_php5.3_enc_zend.php

PHP5.4 needs the loader for format 5 to execute *_php5.4_enc_zend.php (but there isn't one)

etc, etc, etc,


The same basically holds true for the ionCube loader -- the loader must match the version of PHP it is running under. But, the ionCube processed file should be able to be executed no matter what the version pair of PHP/ioncube -- until it doesn't.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...