Post by Satyadeo_k » Thu Mar 21, 2019 12:35 am

Hi,

I am on 3.0.2.0 and uploaded the file for 3.0.3.1 to upgrade.
I am getting the following error on running the upgrade script.

Error Code(0): Error: Duplicate entry 'a72fab13024cb82eb5d4045430' for key 'PRIMARY'
Error No: 1062
ALTER TABLE `session` ADD PRIMARY KEY(`session_id`) in /home/XXXXXX/public_html/system/library/db/mysqli.php on line 40

Website is down now. Please help

Rgds
Satya

Newbie

Posts

Joined
Tue May 12, 2015 12:00 am

Post by Satyadeo_k » Thu Mar 21, 2019 7:19 am

Any idea? What could be happening here. Really stuck. Getting this kind of error for the first time

Newbie

Posts

Joined
Tue May 12, 2015 12:00 am

Post by haxcop » Thu Mar 21, 2019 9:03 am

Same Here Guys.
Seems to me a compatibility issu with mysql version - in my case is v8.

Error Code(0): Error: Duplicate entry '1-1' for key 'PRIMARY'
Error No: 1062
ALTER TABLE `ocuk_product_description` ADD PRIMARY KEY(`product_id`,`language_id`) in /home/user/public_html/dummy.com/system/library/db/mysqli.php on line 40

Help appreciated.

New member

Posts

Joined
Tue Jan 14, 2014 9:38 pm
Location - Dublin

Post by trustgsm » Sun Jul 21, 2019 1:29 pm

same here

New member

Posts

Joined
Sat Oct 18, 2014 5:06 am

Post by trustgsm » Sun Jul 21, 2019 2:28 pm

Error Code(0): Error: Duplicate entry 'ace9e6c1b8b421f8a29ed8e940' for key 'PRIMARY'
Error No: 1062
ALTER TABLE `oc_session` ADD PRIMARY KEY(`session_id`) in /home/trustgsm/public_html/store4phone/system/library/db/mysqli.php on line 40

New member

Posts

Joined
Sat Oct 18, 2014 5:06 am

Post by straightlight » Sun Jul 21, 2019 7:25 pm

Truncate your oc_session table from PHPMyAdmin and run the provided query into your SQL tab in the console. This should resolved the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by trustgsm » Sun Jul 21, 2019 7:56 pm

i have restore \mysql .sql from backup from phpmyadmin

now server back & Version 3.0.3.2

but when install getting error below, install not finish


Internal Server Error Internal Server Error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@store4phone.trust-gsm.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

New member

Posts

Joined
Sat Oct 18, 2014 5:06 am

Post by xxvirusxx » Sun Jul 21, 2019 8:34 pm

Why you want to upgrade to 3.0.3.1/3.0.3.2?

You can try to install a clean version in a folder to check if you have internal server errors.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by trustgsm » Sat Oct 24, 2020 4:16 am

how to fix ??

Error Code(0): Error: Duplicate entry 'f05aca33365efdcd087d02eaba' for key 'PRIMARY'
Error No: 1062
ALTER TABLE `oc_session` ADD PRIMARY KEY(`session_id`) in /home/trustgsmmain/public_html/system/library/db/mysqli.php on line 40

New member

Posts

Joined
Sat Oct 18, 2014 5:06 am

Post by straightlight » Sat Oct 24, 2020 4:24 am

Re-create the session table handled from your install/opencart.sql file. Simply paste both queries into your PHPMyAdmin > SQL tab under your OC database. Ensure to replace all table prefixes in your query with your actual query before you execute it. Most importantly, always create a backup prior to apply manual changes to your database.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 301 guests