Jump to content
thirty bees forum

Eleazar's post from PS as he is gone now :( Adapting PrestaShop 1.5.6 and 1.6.1x to PHP 7.2


Billy

Recommended Posts

***Please disregard the PS 1.5.x versions as that does not have any bearing on the TB eCommerce system. I'm trying to convert the files Eleazar provided hopefully for use with TB.***

-----------

For those of you who don't want to miss their smooth running PrestaShop 1.5.6 and want or need to upgrade to PHP 7.2, here are the essential fixes for download.

Sometimes there are just small changes. Larger modifications were mainly necessary in tools and classes, also for the editor TinyMCE.

The class Rijndael (classes/Rijndael.php) has to be replaced by a patched one that switches to Open SSL in case the mcrypt extension of PHP 7.2 is not installed. This is no longer the case with 7.2 by default. I'd recomend to use the Rijndael.php which is included since PrestaShop 1.6.1.18. Nevertheless PrestaShop 1.5 would steadfastly refuse to keep Rijndael active (you find the radio button at the bottom of the Back Office menu Advanced settings --> Performance) and always wants to switch to Blowfish. This requires a little trick for both PrestaShop 1.5 and 1.6: The Boolean variable PS_CIPHER_ALGORITHM in the database table ps_configuration has to be set to 1. This can be done with PHPMyAdmin, either directly by an input in the corresponding field, or in the SQL window by entering the following command:

 UPDATE `ps2_configuration` SET `value` = 1 WHERE `name` = 'PS_CIPHER_ALGORITHM' `ps2_configuration`.

However, this is already the only database intervention required.

Smarty has provided an upgrade for PHP 7.2, but this is not backward compatible. So you should really just make the fixes you find in the zip files.

For conservative results, here's a short guide to how to proceed:

  1. Switch your shop to maintenance mode. Don't forget to enter your own IP so that you can continue to access your shop front.
  2. In the config/settings.inc.php switch on the debug mode (from false --> true).
  3. Backup all originals of patched files from your shop prior to patching.
  4. Check if one or the other file is overridden. Then the changed code must be always be fixed in the Override.
  5. After importing the patched files, test the shop in any way and check out all payment methods once.
  6. Be sure to also test the behavior of - if available - third-party modules or a third-party theme (e.g. Sunnytoo’s Transformer theme needs some fixes)!
  7. For frontend and backend tests the following applies: Messages like "Notice" or "Warning" can normally be ignored, but you should carefully make a note of any error message ("Error") with the place (file, line) where it was found and the hint for modifying it. If you don't know what to do here, you can report the error message - and please only errors! - in this topic.

For security reasons, the download is provided with a checksum, whose validity you can check by double-clicking on the sha256 file in the mantle zip file. (Of course on your home PC before the upload).

Download all files here: PS 1562 modified for PHP 7.2.zip

These patch files were tested and work like a charm in production mode in PrestaShop 1.5.6.1 and 1.5.6.2. Nevertheless I don't want to rule out to have forgotten something - so critical reviews are welcome!

**************************************************************

 Changes for PrestaShop 1.6

EDIT: In PrestaShop 1.6 there are fewer changes, but these should also be better incorporated to avoid unpleasant surprises.PS 1.6.1x Umstellung auf PHP 7.2.zip Here is a summary of all major core changes for download: PS 1.6.1x Umstellung auf PHP 7.2.zip

Please read the readme.txt included in the Download before uploading the contents of the zip file to your PrestaShop 1.6!

PS 1.6.1x Umstellung auf PHP 7.2.zip

  • Like 1
Link to comment
Share on other sites

The only file that you can download is the one at the very bottom for PS 1.6.1x

I felt this was an important post on PS forum which is no longer their as Eleazar has left the building. 

So i found it in Google Cache and re-posted here in the tip/trick section.

If the powers that be do not approve then slay the post by the way side then!

_Bill

Edited by Script-Fu
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...