Jump to content

Upgrading from 1.6.16 to latest version. PHP issue


Recommended Posts

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   

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by hank22 (see edit history)

Share this post


Link to post
Share on other sites

@ 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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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...

Important Information

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