Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
  • Activity

bitwise's Achievements

  1. I guess, the 1-Click Upgrade module v 1.6.7 was released prior to PHP 7.1.0 availability, therefore wasn’t tested on that version. PHP 7.1.0 brings more strict usage of variables that way, avoiding missuses. So what works in PHP 5.4 to 5.6 doesn’t necessary works in PHP 7.1.X. So, for those of you, whose PHP version is greater than 7.1.0 (at the time of writing, last PHP version is 7.1.7), to fix errors in this module when upgrading and restoring Prestashop version 1.6, there is a workaround: Through FTP, open the file “DbQuery.php”, situated on root directory/modules/autopugrade/db/, go to line 39 where you find ‘from’ => ‘’, and change it to ‘from’ => array(), The result will be: protected $query = array( 'select' => array(), 'from' => array(), 'join' => array(), 'where' => array(), 'group' => array(), 'having' => array(), 'order' => array(), 'limit' => array('offset' => 0, 'limit' => 0), ); This is needed, because, on line 70 of the same file, the “from” variable is accessed as an array and not as string. In PHP 5.4 – 5.6, the conversion from string to array was done automatic, but in PHP 7.1, the variables must be declared strict… The second workaround, is going to be on “AdminSelfUpgrade.php” file, situated on root directory/modules/autopugrade/. Open it and go to line 3035 where you will find the following structure: $files = scandir($this->backupPath.DIRECTORY_SEPARATOR.$this->restoreName); foreach($files as $file) if (preg_match('#auto-backupdb_[0-9]{6}_'.preg_quote($this->restoreName).'#', $file)) $this->restoreDbFilenames[] = $file; After the line 3035, you must insert the following 2 lines: if(!is_array($this->restoreDbFilenames)) $this->restoreDbFilenames = array(); The result will become: $files = scandir($this->backupPath.DIRECTORY_SEPARATOR.$this->restoreName); if(!is_array($this->restoreDbFilenames)) $this->restoreDbFilenames = array(); foreach($files as $file) if (preg_match('#auto-backupdb_[0-9]{6}_'.preg_quote($this->restoreName).'#', $file)) $this->restoreDbFilenames[] = $file; This is needed, because by no meaning, declaration is omitted in class constructor, on run time, this variable is being seen as string, instead of array. Remember! If you change the module with this modified version, after update, check the module “1-Click Upgrade” version and if is 1.6.7, you can rollback your store to previous version without worry. At the moment I wrote this solution, Prestashop 1.6 reach version and, “1-Click Upgrade” (for Prestashop 1.6) is 1.6.7. Since the guys from Prestashop HQ are very busy developing and maintaining version 1.7, it’s hard to believe that “autoupgrade” module for Prestashop 1.6 will be updated in the future… If is more simple for you, I did a copy of entyre "autoupgrade"autoupgrade_v1.6.7_mod.zip module, version 1.6.7 modified.
  2. Hi there, Tefor My answer will be in English since my Spanish is not so good.... I leave earlier a message about this, here: https://www.prestashop.com/forums/topic/603369-erreurs-avec-php-71/ It's a French discussion but the reply is in English. Good luck!
  3. You are right. I'm testing PrestaShop on PHP and I have the same results... On release page, we have a "change log" page (view here) where, at the core section, they said that Compatibility with 7.1 was fixed. Deprecation of "mcrypt_decrypt()" PHP function was requested and announced from the beginning of PHP7, so a solution (if any, since there is no replacement for that function) could be found until today... In Prestashop 1.7 things are better since is used open ssl encryption To get ride of those warnings provided by "pclzip.lib.php on line 1845": a) edit with a text editor the file "pclzip.lib.php" and comment out the line 1845 (put two slashes in front of the line) add the following line, just after the commented one: $v_memory_limit = preg_replace("/[^0-9.]/", "", trim($v_memory_limit)); The same for the class "Uploader.php" a) edit with a text editor the file "Uploader.php" and comment out the line 122 add the following line, just after the commented one: $bytes = preg_replace("/[^0-9.]/", "", trim($post_max_size)); This warning is provided by the way the function "ini_get" read the php.ini file. Each of those vars that trigger a Notice, are represented in PHP initialization file by a number followed by a letter (G for gigabyte, M for Megabytes and K for kilobytes. e.g post_max_size=5M). Before PHP 7, the multiplication function use to get only the numeric part of the operators. Since PHP 7 is "more strict", despite the fact that the math operation is done, a notice message is send. Those added lines eliminate any alpha character from the future operator, leaving only digits and decimal separator(if any). By modifying core files you will get a temporary solution (Not recommended). Upgrading to another version of Prestashop you will loose these modifications. For Rjindael class, things are different. You get a warning message to let you find an alternative to "mcrypt_encrypt()" and "mcrypt_decrypt()" PHP functions because, in the future PHP releases, those functions will be removed for good, so upgrading to PHP 7.2 you will not get a warning anymore but an error... Switching to Blowfish instead Rjindael encryption, in Advanced parameters > Preformance, (your cookie will be reset and the cookie encryption/decryption process is slower than Rjindael) you will not get anymore that warning. Hope this helps a little...
  4. You must enter in Advanced Parameters -> Performance and on "Combinations" item, check Yes and Save. You will se that now you can add to cart. Similar to this, I have manualy changed the value to "false" on "PS_COMBINATION_FEATURE_ACTIVE", direct from phpMyAdmin in "configuration" table .
  5. For Prestashop v1.5.2+ users The first error: “Notice: Undefined offset: 6 in C:\xampp\htdocs\demo\modules\minicslider\minicslider.php on line 449” form the top page will dissapear if you comment (put // on the first position of the line) the line 449 of the minicslider.php file an write the following code, on the next line: $defLangIso = Language::getIsoById($defLanguages); This will solve the language problem mentioned in this post. Not shure yet, but the Notice about “Index id” will also dissaper.
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More