Page 1 of 1

FATAL error when editing System Settings

Posted: Fri Feb 05, 2016 4:14 pm
by lexalex83
Opencart version is 1.5.6.1

When I trying to open System->Settings in opencart and to do some changes there, or do nothing and just open settings and press "Save" I see this error in browser:

Code: Select all

PHP Fatal error: Uncaught exception 'ErrorException' with message 'Error: Field 'serialized' doesn't have a default value<br />Error No: 1364<br />INSERT INTO oc_setting SET store_id = '0', `group` = 'config', `key` = 'config_name', `value` = 'Свой китаец - комплектующие для станков ЧПУ'' in D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\system\database\mysqli.php:40
Stack trace:
#0 D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\system\library\db.php(20): DBMySQLi->query('INSERT INTO oc_...')
#1 D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\admin\model\setting\setting.php(24): DB->query('INSERT INTO oc_...')
#2 D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\admin\controller\setting\setting.php(13): ModelSettingSetting->editSetting('config', Array)
#3 [internal function]: ControllerSettingSetting->index()
#4 D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\system\engine\front.php(42): call_user_func_array(Array, Array)
#5 D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\system\engine\front.php(29): Front->execute(Object(Act in D:\INETPUB\VHOSTS\kitaez-cnc.com\httpdocs\system\database\mysqli.php on line 40


After this in admin I see this:
aaas.png

aaas.png (48.04 KiB) Viewed 14999 times

And something strange is going on with my opencart theme.

I have this problem only on webhosting (bluehost.com). When I using my local hosting (OpenServer) I have no thiserror.
What Imust to do?? help ^(

Re: FATAL error when editing System Settings

Posted: Mon Feb 22, 2016 11:20 pm
by EvolveWebHosting
Has your site been hacked or are you missing files during the upload process?

Re: FATAL error when editing System Settings

Posted: Thu May 26, 2016 8:33 pm
by lemonadv
I have the same problem! I saw that MySQL version on my server is 5.6 then I found this:

Since mysql 5.6, there is a new default that makes sure you are explicitly inserting every field that doesn't have a default value set in the table definition.
This is caused by MySQL having a strict mode set which won’t allow INSERT or UPDATE commands with empty fields where the schema doesn’t have a default value set.

My hosting provider disable this Strict Mode and now everything seems to work fine! I'm not fully sure if this is a solution but for now work!

What about you? Do find any solution of this problem?

Re: FATAL error when editing System Settings

Posted: Thu Mar 21, 2019 9:55 pm
by Dunald
Hi
Just came across the same error.
Does anyone know how to solve this? I use php7,2 and OC 1.5.6.1
After this error I no longer can log in to my Admin and my default language (swedish) is not visible in admin or front of my store. So I have no access to the admin and since all my products that I have in the store is in the Swedish language I no longer have ant visible products in the store....
the site is www. er gon om i (dot) in fo ( <----sorry but I do not want Google to index my sites name here)

Re: FATAL error when editing System Settings

Posted: Fri Mar 22, 2019 7:34 am
by EvolveWebHosting
Dunald wrote:
Thu Mar 21, 2019 9:55 pm
Hi
Just came across the same error.
Does anyone know how to solve this? I use php7,2 and OC 1.5.6.1
After this error I no longer can log in to my Admin and my default language (swedish) is not visible in admin or front of my store. So I have no access to the admin and since all my products that I have in the store is in the Swedish language I no longer have ant visible products in the store....
the site is www. er gon om i (dot) in fo ( <----sorry but I do not want Google to index my sites name here)
Originally, OC 1.5.6.1 won't run on PHP 7.2. Have you modified it to support PHP 7.2? If not, you'll need to change back to PHP 5.6 and then upgrade your OC install to one of the newer versions to support PHP 7.2

Re: FATAL error when editing System Settings

Posted: Tue Mar 26, 2019 4:15 am
by johnp
This is worth a read:

viewtopic.php?f=20&t=210664

Re: FATAL error when editing System Settings

Posted: Sun Mar 31, 2019 10:34 am
by Dunald
PHP is (now) working fine. Needed to edit in the system to make it work. But one of my 1.5.5.1 sites got the same error as above.
I use one.com and the are not really that great in support but today they was in a good mood and solved the issue.
First I hade to restore the site (costs money but is free for 30 days so I restored it)
Then I hade to run this SQL in my database: ALTER TABLE `setting` CHANGE `serialized` `serialized` TINYINT(1) NULL DEFAULT '0';
That´s it. Now when I visit my sites admin and do the same thing that got me the error in the first place there was no error. All is fine. I am happy. Hopefully someone els can be happy with the same solution. :-)

Re: FATAL error when editing System Settings

Posted: Tue Apr 02, 2019 7:07 am
by IP_CAM
Well, it was that funny Shop-Name-Value, whatever it means,
probably screwing up something. ;)

Code: Select all

`value` = 'Свой китаец - комплектующие для станков ЧПУ''
But, to fix such, will sure not make a 1.5.x.x Version able
to handle PHP v.7.x, the system/library/encryption.php file
needs to be changed in any case. Just to have this mentioned too.
Ernie
---
Image