itmag.pro Posted December 16, 2016 Share Posted December 16, 2016 (edited) If use PHP 7.1 for PrestaShop 1.6.x only (in 1.7.x this fixed) we have get this fatal error: [16-Dec-2016 01:15:47 Europe/Kiev] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/classes/db/DbQuery.php:96 need change: protected $query = array( 'type' => 'SELECT', 'select' => array(), 'from' => '', 'join' => array(), 'where' => array(), 'group' => array(), 'having' => array(), 'order' => array(), 'limit' => array('offset' => 0, 'limit' => 0), ); to protected $query = array( 'type' => 'SELECT', 'select' => array(), 'from' => array(), 'join' => array(), 'where' => array(), 'group' => array(), 'having' => array(), 'order' => array(), 'limit' => array('offset' => 0, 'limit' => 0), ); Edited December 16, 2016 by www.remoteshaman.com (see edit history) 5 3 Link to comment Share on other sites More sharing options...
itmag.pro Posted December 16, 2016 Author Share Posted December 16, 2016 (edited) PrestaShop has not been made compatible with PHP 7.1. You will come across this problem even more. PHP 7 provide best performance than PHP 5. PrestaShop must be adopt for/under PHP 7!!! After fix DbQuery.php my PrestaShop 1.6.1.10 (backend and frontend) worked fine on PHP 7.1 - no php errors in php-errors.log no server errors and other errors I not find. Edited December 16, 2016 by www.remoteshaman.com (see edit history) Link to comment Share on other sites More sharing options...
duredo Posted December 16, 2016 Share Posted December 16, 2016 PHP 7 provide best performance than PHP 5. PrestaShop must be adopt for/under PHP 7!!! After fix DbQuery.php my PrestaShop 1.6.1.10 (backend and frontend) worked fine on PHP 7.1 - no php errors in php-errors.log no server errors and other errors I not find. hi, can you attach your DbQuery.php here? I need to try it Link to comment Share on other sites More sharing options...
itmag.pro Posted December 16, 2016 Author Share Posted December 16, 2016 hi, can you attach your DbQuery.php here? I need to try it Get from github: https://github.com/PrestaShop/PrestaShop/pull/7232 https://github.com/PrestaShop/PrestaShop/blob/1.6.1.x/classes/db/DbQuery.php 2 Link to comment Share on other sites More sharing options...
nikolaosp Posted December 16, 2016 Share Posted December 16, 2016 If use PHP 7.1 for PrestaShop 1.6.x only (in 1.7.x this fixed) we have get this fatal error: [16-Dec-2016 01:15:47 Europe/Kiev] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/classes/db/DbQuery.php:96 need change: protected $query = array( 'type' => 'SELECT', 'select' => array(), 'from' => '', 'join' => array(), 'where' => array(), 'group' => array(), 'having' => array(), 'order' => array(), 'limit' => array('offset' => 0, 'limit' => 0), ); to protected $query = array( 'type' => 'SELECT', 'select' => array(), 'from' => array(), 'join' => array(), 'where' => array(), 'group' => array(), 'having' => array(), 'order' => array(), 'limit' => array('offset' => 0, 'limit' => 0), ); Your solution worked for me as well. Did not have this problem with php 7.0.7 though Thanks anyway 1 Link to comment Share on other sites More sharing options...
duredo Posted December 17, 2016 Share Posted December 17, 2016 (edited) Get from github: https://github.com/PrestaShop/PrestaShop/pull/7232 https://github.com/PrestaShop/PrestaShop/blob/1.6.1.x/classes/db/DbQuery.php great, my live site running PHP 7.1 now, will update if there is any errors === Update === I found error, there is no content on my dashboard statistics Edited December 17, 2016 by duredo.com (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted December 17, 2016 Share Posted December 17, 2016 I would stick with PHP 7.0.13 (or the latest of the 7.0) branch for now. There are likely other changes required to fully support PHP 7.1. Ideally you should create forge tickets for those issues, or contribute to Prestashops github as you find and fix issues Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted May 6, 2017 Share Posted May 6, 2017 i upgrade my server to php 7.0.18 and mysql 5.7 it's much faster than before,it's will take about 1700ms to load the product page, now only 500ms Link to comment Share on other sites More sharing options...
Claudiocool Posted September 9, 2018 Share Posted September 9, 2018 Am 17.12.2016 um 5:37 AM schrieb duredo.com: great, my live site running PHP 7.1 now, will update if there is any errors === Update === I found error, there is no content on my dashboard statistics Did you or anyone else find any solution for the Dashboard? Link to comment Share on other sites More sharing options...
fettah Posted September 13, 2018 Share Posted September 13, 2018 thank you it works very well Link to comment Share on other sites More sharing options...
plutten22 Posted November 29, 2018 Share Posted November 29, 2018 Hi. There is no content on my dashboard statistics when i change to PHP 7.1 Did you or anyone else find any solution for the Dashboard? Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2018 Share Posted November 29, 2018 9 minutes ago, plutten22 said: Hi. There is no content on my dashboard statistics when i change to PHP 7.1 Did you or anyone else find any solution for the Dashboard? What is your exact version of Prestashop? Perhaps you should not use PHP 7.1, and should revert to a supported PHP version Link to comment Share on other sites More sharing options...
plutten22 Posted November 29, 2018 Share Posted November 29, 2018 Hi. My version is 1.6.1.10 My provider is changing from php 5.6 to 7.1 . Any sulotion. Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2018 Share Posted November 29, 2018 PS v1.6.1.10 does not support PHP 7.1 Your options? Upgrade to the latest version of PS v1.6 Downgrade your PHP version to PHP 5.6 or possibly 7.0 Apply patches to Prestashop to support PHP 7.1 Link to comment Share on other sites More sharing options...
plutten22 Posted November 29, 2018 Share Posted November 29, 2018 Ok i understand. I have made a lot of chages to the prestashop standard theme so i dont want to upgrade bc the changes will be lost. I can not downgrade to PHP 5.6 bc my supplyer will not have it after 27 december. How can i apply patches to Prestashop to support PHP 7.1 Regards Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2018 Share Posted November 29, 2018 That might depend on your skill level with coding. Generally I go through the release notes and change logs for Prestashop, identify the individual changes that were made so that PS v1.6 would support PHP 7.1, and then manually apply those changes to your core files. If you are not a proficient coder, then you might need to look into hiring a developer Link to comment Share on other sites More sharing options...
El Patron Posted November 29, 2018 Share Posted November 29, 2018 best to move to hosting that is not dropping php 5.6. Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2018 Share Posted November 29, 2018 5.6 loses support from PHP this month. PHP 7.0 does as well so really you should be looking to properly maintain your store and keep it up to date being afraid to upgrade because of customizations you made is unfortunately not a good answer. And will instead leave you open to security issues Link to comment Share on other sites More sharing options...
plutten22 Posted November 30, 2018 Share Posted November 30, 2018 Ok. Thanks for the answers. I will upgrade my site. Regards Link to comment Share on other sites More sharing options...
plutten22 Posted December 5, 2018 Share Posted December 5, 2018 Hi. I have now upgraded my site to 1.6.1.23 but it dos not work with php 7.1 Backoffice work but frontoffice dos not. I attache a picture. Regards Link to comment Share on other sites More sharing options...
bellini13 Posted December 5, 2018 Share Posted December 5, 2018 perhaps you have a custom theme or module that does not support it. enabled debug mode and see if that provides a helpful error Link to comment Share on other sites More sharing options...
plutten22 Posted December 5, 2018 Share Posted December 5, 2018 Ok. I will look at this. Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted December 6, 2018 Share Posted December 6, 2018 upgrade to 1.7 and you can use php 7.2. It cannot get much worse lol Link to comment Share on other sites More sharing options...
dandumit Posted February 19, 2019 Share Posted February 19, 2019 also in Product.php line 5151 $sql_values = ''; has to be changed to $sql_values = array(); Link to comment Share on other sites More sharing options...
jorgeduarte Posted May 7, 2019 Share Posted May 7, 2019 On 12/16/2016 at 1:31 AM, www.remoteshaman.com said: Get from github: https://github.com/PrestaShop/PrestaShop/pull/7232 https://github.com/PrestaShop/PrestaShop/blob/1.6.1.x/classes/db/DbQuery.php thank you! Link to comment Share on other sites More sharing options...
Ajay Kumar Posted August 23, 2019 Share Posted August 23, 2019 (edited) @www.remoteshaman.com Thank you very much. its working for me also Edited August 23, 2019 by Ajay Kumar (see edit history) Link to comment Share on other sites More sharing options...
lagoacity Posted September 24, 2019 Share Posted September 24, 2019 Hello, I needed a help, I have a problem with the site where overnight the images of the site were all in error. We talked to the person who handled the accommodation and made the change to php because there had been an error and would have to change the php but then I got the images "no images". If I enter BackOffice in a product the images are there, but on the site they do not appear. How can I solve this situation? Prestashop version 1.6.1.7 PHP version: 7.1.32 https://www.winespiritus.com/ Through the link you can see the images of products that are not giving I look forward to a brief reply. Best regards, André Correia! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now