hank22 Posted February 7, 2021 Share Posted February 7, 2021 Hello, I currently using PS 1.6.1.6 and I uploaded the newest Prestashop software to a sub folder on my site. Current PHP is 7.0. Once I change PHP to 7.1 I can no longer access my website and get Error 500. How can I get 1.6.1.6 to work with PHP 7.1 ? Thank You Link to comment Share on other sites More sharing options...
joseantgv Posted February 7, 2021 Share Posted February 7, 2021 Link to comment Share on other sites More sharing options...
Rhobur Posted February 7, 2021 Share Posted February 7, 2021 it is not PHP fault or Prestashop's itself it is the fact that you have some modules (or modifications) using obsolete PHP 5.+ code. Enable Debug as @joseantgv said and you'll be able to see who's causing the issue(s); if a module disable it. Link to comment Share on other sites More sharing options...
hank22 Posted February 7, 2021 Author Share Posted February 7, 2021 (edited) Ok, thanks. Here is what I am seeing below: "PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/**/public_html/classes/db/DbQuery.php:96 Stack trace: #0 /home/**/public_html/Adapter/Adapter_EntityMapper.php(45): DbQueryCore->from('shop', 'a') #1 /home/**/public_html/classes/ObjectModel.php(233): Adapter_EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /home/**/public_html/classes/shop/Shop.php(131): ObjectModelCore->__construct('1', NULL, NULL) #3 /home/**/public_html/classes/shop/Shop.php(397): ShopCore->__construct('1') #4 /home/**/public_html/config/config.inc.php(114): ShopCore::initialize() #5 /home/**/public_html/index.php(27): require('/home/**/...') #6 {main} thrown in /home/**/public_html/classes/db/DbQuery.php on line 96" Edited February 7, 2021 by hank22 (see edit history) Link to comment Share on other sites More sharing options...
Rhobur Posted February 8, 2021 Share Posted February 8, 2021 Yeah... a PHP 7.1 issue, a fix is described here, https://stackoverflow.com/questions/41000714/php7-1-fatal-error-operator-not-supported-for-strings 1 Link to comment Share on other sites More sharing options...
joseantgv Posted February 8, 2021 Share Posted February 8, 2021 https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/#php-compatibility-chart Link to comment Share on other sites More sharing options...
hank22 Posted February 8, 2021 Author Share Posted February 8, 2021 @ Rhobur Looking at the fix you linked to what would I need to do? I'm not sure what the steps I need to follow. Sorry, I have limited tech experience in this field. Thanks, Mike Link to comment Share on other sites More sharing options...
Rhobur Posted February 8, 2021 Share Posted February 8, 2021 I am not sure what the code is there but assuming you have something like $blabla[] = 'some string here', the $blabla variable is not declared as an array. So you might try adding just above the line in question (#95) so on #94 an array initialization: $blabla = array(); and see if it is working. Link to comment Share on other sites More sharing options...
joseantgv Posted February 8, 2021 Share Posted February 8, 2021 I'm afraid you should downgrade your PHP to 5.6 or upgrade PS version to 1.6.1.24. 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