Jump to content

Fatal error: Uncaught Error: [] operator not supported for strings


Penge

Recommended Posts

Hello all.

 

I hope you can help me with this problem I have runned into.

 

First some facts:

 

My domain is strazz.no

I am running Prestashop 1.6.1.6

My host is running PHP ver 7.0

 

 

So my problem.

 

I have moved to a new host.

The domain is moved to the new host.

I took a backup of all my files via FTP and loaded them into the new host.

The database I did an export via mysql admin.

I created a new database on my new host. The database name was different, so also the username and password.

I imported the database file into the new database. Sucsessfull.  No errors.

 

i edited the settings.inc.php file with the new info for the database (server, user, password, database name)

 

 

When I go to my shop or admin I got the following error message when I turn debug on.

Can anyone help me understand this error message ?

 

 

Fatal error: Uncaught Error: [] operator not supported for strings in /customers/4/e/1/strazz.no/httpd.www/classes/db/DbQuery.php:96 Stack trace: #0 /customers/4/e/1/strazz.no/httpd.www/Adapter/Adapter_EntityMapper.php(45): DbQueryCore->from('shop', 'a') #1 /customers/4/e/1/strazz.no/httpd.www/classes/ObjectModel.php(233): Adapter_EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /customers/4/e/1/strazz.no/httpd.www/classes/shop/Shop.php(131): ObjectModelCore->__construct('1', NULL, NULL) #3 /customers/4/e/1/strazz.no/httpd.www/classes/shop/Shop.php(397): ShopCore->__construct('1') #4 /customers/4/e/1/strazz.no/httpd.www/config/config.inc.php(114): ShopCore::initialize() #5 /customers/4/e/1/strazz.no/httpd.www/admin6043g2wjj/index.php(36): require('/customers/4/e/...') #6 {main} thrown in /customers/4/e/1/strazz.no/httpd.www/classes/db/DbQuery.php on line 96

 

 

For me it seem to have something to do with the database ?

 

Is it recommended to do a clean installation and then copy over the files and database afterwards ?

 

 

Thanks

 

 

Petter

Link to comment
Share on other sites

Thank you bellini13.

 

Yes I am sure.

It was php 7.1 as default so I changed it to php 7.0 because I knew it would not be compatible.

 

One thing I am wondering though is that on the old server I had the prestashop files at /www/ but on the new server they are located just under root.

Do you think that could be a problem wnen I just copy the files and database over ?  Does prestashop use the complete path startiing with /www/  ?

I was just thinking about this when I see the error message were the www is stated.

 

What do you think ??

 

 

Petter

Link to comment
Share on other sites

Yes bellini13

 

That is correct.

 

I am trying a clean instalattion now with version 1.6.10 and a clean database.

The installation stoppes at 23% every time and without any error message or log message .

Only that an error ocurred.

 

 

Petter

Link to comment
Share on other sites

  • 3 years later...
On 12/23/2016 at 2:24 AM, Penge said:

Hello all.

 

I hope you can help me with this problem I have runned into.

 

First some facts:

 

My domain is strazz.no

I am running Prestashop 1.6.1.6

My host is running PHP ver 7.0

 

 

So my problem.

 

I have moved to a new host.

The domain is moved to the new host.

I took a backup of all my files via FTP and loaded them into the new host.

The database I did an export via mysql admin.

I created a new database on my new host. The database name was different, so also the username and password.

I imported the database file into the new database. Sucsessfull.  No errors.

 

i edited the settings.inc.php file with the new info for the database (server, user, password, database name)

 

 

When I go to my shop or admin I got the following error message when I turn debug on.

Can anyone help me understand this error message ?

 

 

Fatal error: Uncaught Error: [] operator not supported for strings in /customers/4/e/1/strazz.no/httpd.www/classes/db/DbQuery.php:96 Stack trace: #0 /customers/4/e/1/strazz.no/httpd.www/Adapter/Adapter_EntityMapper.php(45): DbQueryCore->from('shop', 'a') #1 /customers/4/e/1/strazz.no/httpd.www/classes/ObjectModel.php(233): Adapter_EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /customers/4/e/1/strazz.no/httpd.www/classes/shop/Shop.php(131): ObjectModelCore->__construct('1', NULL, NULL) #3 /customers/4/e/1/strazz.no/httpd.www/classes/shop/Shop.php(397): ShopCore->__construct('1') #4 /customers/4/e/1/strazz.no/httpd.www/config/config.inc.php(114): ShopCore::initialize() #5 /customers/4/e/1/strazz.no/httpd.www/admin6043g2wjj/index.php(36): require('/customers/4/e/...') #6 {main} thrown in /customers/4/e/1/strazz.no/httpd.www/classes/db/DbQuery.php on line 96

 

 

For me it seem to have something to do with the database ?

 

Is it recommended to do a clean installation and then copy over the files and database afterwards ?

 

 

Thanks

 

 

Petter

sir, i have also got same error? you think you can help me out with this?

 

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...