Jump to content

Resolved - PHP Version 5.4.4


Guest Ant_89

Recommended Posts

Guest Ant_89

Hi,

I just upgraded PHP to the newest version 5.4.4 on the sever.

Cubecart would not load, it just went to a blank page? Does anyone know why this would happen? Does Cubecart not support it?

I have rolled back to an older version to PHP and it works fine.

Any advise would be appreciated.

Thanks

Ant

Link to comment
Share on other sites

As a quick test to see if your PHP is even working, create a file named 'phpinfo.php' and use the following as its contents:

<?php phpinfo() ?>




Upload that to your store site and then call for it with a browser: www.mysite.com/phpinfo.php





Please be sure to mention the exact version of CubeCart you are referring to.



To be 100% sure, we would need to see the relevent lines of the PHP Error Log (usually not available to you unless you run your own server).



But, as an experiment, in the file ini.inc.php, find:



if (PHP_5_3) {

	ini_set('register_globals', false);		// Attempt to disable regster_globals for security

	ini_set('register_long_arrays', false);	// Disable old-school long arrays (i.e. HTTP_*_VARS)

	ini_set('magic_quotes_gpc', false);		// Turn off magic quotes

	ini_set('magic_quotes_runtime', false);

}



and put // in front of each line:



// if (PHP_5_3) {

//	ini_set('register_globals', false);		// Attempt to disable regster_globals for security

//	ini_set('register_long_arrays', false);	// Disable old-school long arrays (i.e. HTTP_*_VARS)

//	ini_set('magic_quotes_gpc', false);		// Turn off magic quotes

//	ini_set('magic_quotes_runtime', false);

// }

PHP 5.4.x has removed certain ini settings, and perhaps attempting to set them returns a Fatal Error situation (although I don't know why Warnings would not suffice).

I just upgraded my PHP to 5.4.4 (thread-safe vc9 for Windows not running under Apache) and CC510 worked for me - but I didn't clear any cache.

Link to comment
Share on other sites

Guest Ant_89

As a quick test to see if your PHP is even working, create a file named 'phpinfo.php' and use the following as its contents:

<?php phpinfo() ?>




Upload that to your store site and then call for it with a browser: www.mysite.com/phpinfo.php





Please be sure to mention the exact version of CubeCart you are referring to.



To be 100% sure, we would need to see the relevent lines of the PHP Error Log (usually not available to you unless you run your own server).



But, as an experiment, in the file ini.inc.php, find:



if (PHP_5_3) {

	ini_set('register_globals', false);		// Attempt to disable regster_globals for security

	ini_set('register_long_arrays', false);	// Disable old-school long arrays (i.e. HTTP_*_VARS)

	ini_set('magic_quotes_gpc', false);		// Turn off magic quotes

	ini_set('magic_quotes_runtime', false);

}



and put // in front of each line:



// if (PHP_5_3) {

//	ini_set('register_globals', false);		// Attempt to disable regster_globals for security

//	ini_set('register_long_arrays', false);	// Disable old-school long arrays (i.e. HTTP_*_VARS)

//	ini_set('magic_quotes_gpc', false);		// Turn off magic quotes

//	ini_set('magic_quotes_runtime', false);

// }

PHP 5.4.x has removed certain ini settings, and perhaps attempting to set them returns a Fatal Error situation (although I don't know why Warnings would not suffice).

I just upgraded my PHP to 5.4.4 (thread-safe vc9 for Windows not running under Apache) and CC510 worked for me - but I didn't clear any cache.

Thanks for your help.

I can confirm that PHP 5.4.4 is working fine when I run phpinfo. All my other sites also work fine.

I commented out those settings as suggested but unfortuantely this did not solve the issue.

The version of cube cart that I am running is 5.1.1. Do you have any other ideas?

Thanks again

Link to comment
Share on other sites

When I said that CC510 worked for me, I meant that the various separate files seem to have no problems.

I have since learned that ionCube and ZendGuard, as of March 2012, would not work with PHP5.4. At the end of May, versions came out that promised that encoded files (which CubeCart has one such file) written for PHP5.3 would run on PHP5.4.

So, when you say, "I just upgraded PHP to the newest version 5.4.4 on the sever," is this your own server or a hosted, shared server? In any case, you will need to get the ionCube (www.ioncube.com/loaders.php) or Zend loaders and somehow get whichever installed on your server.

Link to comment
Share on other sites

Guest Ant_89

I can confirm that we run our own server.

I have installed the ioncube loaders but that didn't work, so I will try ZendGuard.

Is this what I would need to install? http://www.zend.com/en/products/guard/downloads

Thank you

Link to comment
Share on other sites

Can you let us know what decoder you installed CubeCart under initially? ionCube or ZendGuard? Because the determination made during setup/installation is saved in the /includes/global.inc.php file. And CubeCart will then use that method indicated in that file.

So, if CubeCart has saved Zend as the method to decode, whatever you do to ionCube is not going to change anything.

Also, according to a lack of information regarding ZendGuard availability for PHP5.4, I will say it is better to go with ionCube for now. If you can get it to work.

Again, check gloabls.inc.php for a line that looks like:

$glob['encoder'] = 'zend';

Make it say:

$glob['encoder'] = 'ioncube';

Link to comment
Share on other sites

Guest Ant_89

I have had a look at the global.inc.php file and it is set as:

$glob['encoder'] = 'ioncube';

Is it a case of just installing the newest version of ionCube on the server? How can I check that it is working correctly?

Thanks for your help with this.

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.

Guest
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...