-
[Done v155] PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
not sure if to post this here please direct me to right place if not im new please help me , every time i try to add more the one attribute i get the time out please refresh page to try again in the error logs i get this UTC] PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY' :: if i do a check msql table after trying to add attribute in zencart I see this in phpmyadmin database .products_attributes check warning Found row where the auto_increment column has the ......
its weird because if i restore with the same backup files and sql to my test server wamp it works fine. but restoring to my web host crazydomains i get these auto_increment issues and cant add more than one attribute ive spent days trying to fix it and have become stuck. please please help me. ill attach log file below.
[27-Feb-2016 06:49:37 UTC] PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY' :: insert into products_attributes (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
values (0,
'311',
'2',
'5',
'0',
'+',
'2',
'1',
'0',
'+',
'0',
'0',
'1',
'',
'1',
'0',
'0',
'0',
'0',
'0',
'',
'',
'0',
'0',
'0',
'0',
'0') in /home/anarchy2/public_html/includes/classes/db/mysql/query_factory.php on line 120
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
its weird because if i restore with the same backup files and sql to my test server wamp it works fine. but restoring to my web host crazydomains i get these auto_increment issues and cant add more than one attribute
Can give much help, but has you've have guess it, there's a ID that's already there.
If you say in your wamp you can restore a backup and it works ok, something is wrong with that table.
Don't even know why a products_attributes_id would be "0" , if fact It should be auto incremented. But I'm not a expert.
I would try to export to csv that table from wamp and your domain and compared then. There's has to be something duplicated.
And after you restore in wamp, you can insert new stuff ?
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
You could try installing the myDEBUG Backtrace plugin (https://www.zen-cart.com/downloads.p...file&id=1879); that will let you (and us) know who is making the malformed call to insert that attribute record.
When/if you do post the generated log, be aware that your admin's secret folder name will appear as part of the data. You'll want to xxx that information out so that the world doesn't know your admin folder's name.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
If understand the discussion, action, and results correctly, the socalled malformed query is in admin/attributes_controller.php beginning at line 311:
Code:
$db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
values (0,
'" . (int)$products_id . "',
'" . (int)$options_id . "',
'" . (int)$values_id . "',
'" . (float)zen_db_input($value_price) . "',
'" . zen_db_input($price_prefix) . "',
'" . (int)zen_db_input($products_options_sort_order) . "',
'" . (int)zen_db_input($product_attribute_is_free) . "',
'" . (float)zen_db_input($products_attributes_weight) . "',
'" . zen_db_input($products_attributes_weight_prefix) . "',
'" . (int)zen_db_input($attributes_display_only) . "',
'" . (int)zen_db_input($attributes_default) . "',
'" . (int)zen_db_input($attributes_discounted) . "',
'" . zen_db_input($attributes_image_name) . "',
'" . (int)zen_db_input($attributes_price_base_included) . "',
'" . (float)zen_db_input($attributes_price_onetime) . "',
'" . (float)zen_db_input($attributes_price_factor) . "',
'" . (float)zen_db_input($attributes_price_factor_offset) . "',
'" . (float)zen_db_input($attributes_price_factor_onetime) . "',
'" . (float)zen_db_input($attributes_price_factor_onetime_offset) . "',
'" . zen_db_input($attributes_qty_prices) . "',
'" . zen_db_input($attributes_qty_prices_onetime) . "',
'" . (float)zen_db_input($attributes_price_words) . "',
'" . (int)zen_db_input($attributes_price_words_free) . "',
'" . (float)zen_db_input($attributes_price_letters) . "',
'" . (int)zen_db_input(
As previously pointed out the auto-increment ought to assign a new value other than 0 to the attribute_id, but there are some servers that are not setup to do that with a value of zero presented... Two solutions I see, either find all such assignments in all queries and either attempt to use null instead or remove such an assignment or work with your host to have them adjust or help you to adjust the mysql settings so that auto_numbering can't start on 0 but instead 1.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
thank you mate this would seem to best answer kinda the track i was going down but haven't had much luck in working it out i even tried rolling site back to a few weeks ago and same issue my backups don't go back that far as i cleaned them out wops> but i don't think a restore will fix it as like you say some hosting servers don't like 0 and wont auto-increment and yet my test server running wamp with updated phpmyadmin will auto-increment fine no problems is defiantly a hosting sql issue with auto-increment 0 . seems strange as the crazy-domains hosting support zencart and have auto installer on there site surely they must know this is a issue. ill keep digging and try have a play with the database see what i can do wish me luck and thanks for the reply's i don't want to lose my site :(
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
also should i be using this check box when importing my database in phpmyadmin <Do not use AUTO_INCREMENT for zero values> has this caused the issue i was told it should be check also using this option on my test server everything works fine so i guess its fine just seem to sound very much like the issue lol
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
mydakota,
This FAQ outlines what should be checked for a "good" database backup
https://www.zen-cart.com/content.php...atabase-backup
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
ok so in this dose not say anything about CHECKED: Add AUTO_INCREMENT value as in the older versions of phpmyadmin but say Settings not mentioned can be left to their defaults. and this option Add AUTO_INCREMENT value is by default checked so i assume its correct. but to me i sounds suspect to the error i get
Using phpMyAdmin v3.4 or higher:
The ideal settings to do a backup via phpMyAdmin are shown below. Settings not mentioned can be left to their defaults.
You will be presented with a choice of "Quick Backup" or "Custom", CHOOSE "Custom", and then make the following selections:
- Output: - Save output to a file, leave all the other settings under Output as defaults, except maybe Compression:
OPTIONAL: - Compression: "gzipped" (or whatever you prefer... gzip makes smaller files, but zip files are easier to read on Windows computers)
- Format: - SQL
- Format-specific options: - You ONLY need to check the "structure and data" option.
- Object creation options: - check ALL the boxes in this section, except the "Add CREATE DATABASE / USE statement" option.
- Data dump options: - choose "INSERT" from the pulldown, and check the "both of the above" option. The rest of the defaults are fine.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
- CHECKED: Add AUTO_INCREMENT value
This is listed in v3.3 or lower
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
ok i have copying pasting this into sql section of admin panel didn't help me still issue is still there i would have though this would have fixed it.
# This script simply rebuilds the auto-increment settings on tables which should have them.
# $ Id: $
ALTER TABLE upgrade_exceptions CHANGE COLUMN upgrade_exception_id upgrade_exception_id smallint(5) NOT NULL auto_increment;
ALTER TABLE address_book CHANGE COLUMN address_book_id address_book_id int(11) NOT NULL auto_increment;
ALTER TABLE address_format CHANGE COLUMN address_format_id address_format_id int(11) NOT NULL auto_increment;
ALTER TABLE admin CHANGE COLUMN admin_id admin_id int(11) NOT NULL auto_increment;
ALTER TABLE admin_activity_log CHANGE COLUMN log_id log_id int(15) NOT NULL auto_increment;
ALTER TABLE authorizenet CHANGE COLUMN id id int(11) unsigned NOT NULL auto_increment;
ALTER TABLE banners CHANGE COLUMN banners_id banners_id int(11) NOT NULL auto_increment;
ALTER TABLE banners_history CHANGE COLUMN banners_history_id banners_history_id int(11) NOT NULL auto_increment;
ALTER TABLE categories CHANGE COLUMN categories_id categories_id int(11) NOT NULL auto_increment;
ALTER TABLE configuration CHANGE COLUMN configuration_id configuration_id int(11) NOT NULL auto_increment;
ALTER TABLE configuration_group CHANGE COLUMN configuration_group_id configuration_group_id int(11) NOT NULL auto_increment;
ALTER TABLE countries CHANGE COLUMN countries_id countries_id int(11) NOT NULL auto_increment;
ALTER TABLE coupon_email_track CHANGE COLUMN unique_id unique_id int(11) NOT NULL auto_increment;
ALTER TABLE coupon_gv_queue CHANGE COLUMN unique_id unique_id int(5) NOT NULL auto_increment;
ALTER TABLE coupon_redeem_track CHANGE COLUMN unique_id unique_id int(11) NOT NULL auto_increment;
ALTER TABLE coupon_restrict CHANGE COLUMN restrict_id restrict_id int(11) NOT NULL auto_increment;
ALTER TABLE coupons CHANGE COLUMN coupon_id coupon_id int(11) NOT NULL auto_increment;
ALTER TABLE currencies CHANGE COLUMN currencies_id currencies_id int(11) NOT NULL auto_increment;
ALTER TABLE customers CHANGE COLUMN customers_id customers_id int(11) NOT NULL auto_increment;
ALTER TABLE customers_basket CHANGE COLUMN customers_basket_id customers_basket_id int(11) NOT NULL auto_increment;
ALTER TABLE customers_basket_attributes CHANGE COLUMN customers_basket_attributes_id customers_basket_attributes_id int(11) NOT NULL auto_increment;
ALTER TABLE email_archive CHANGE COLUMN archive_id archive_id int(11) NOT NULL auto_increment;
ALTER TABLE featured CHANGE COLUMN featured_id featured_id int(11) NOT NULL auto_increment;
ALTER TABLE files_uploaded CHANGE COLUMN files_uploaded_id files_uploaded_id int(11) NOT NULL auto_increment;
ALTER TABLE geo_zones CHANGE COLUMN geo_zone_id geo_zone_id int(11) NOT NULL auto_increment;
ALTER TABLE group_pricing CHANGE COLUMN group_id group_id int(11) NOT NULL auto_increment;
ALTER TABLE ezpages CHANGE COLUMN pages_id pages_id int(11) NOT NULL auto_increment;
ALTER TABLE languages CHANGE COLUMN languages_id languages_id int(11) NOT NULL auto_increment;
ALTER TABLE layout_boxes CHANGE COLUMN layout_id layout_id int(11) NOT NULL auto_increment;
ALTER TABLE manufacturers CHANGE COLUMN manufacturers_id manufacturers_id int(11) NOT NULL auto_increment;
ALTER TABLE media_clips CHANGE COLUMN clip_id clip_id int(11) NOT NULL auto_increment;
ALTER TABLE media_manager CHANGE COLUMN media_id media_id int(11) NOT NULL auto_increment;
ALTER TABLE media_types CHANGE COLUMN type_id type_id int(11) NOT NULL auto_increment;
ALTER TABLE music_genre CHANGE COLUMN music_genre_id music_genre_id int(11) NOT NULL auto_increment;
ALTER TABLE newsletters CHANGE COLUMN newsletters_id newsletters_id int(11) NOT NULL auto_increment;
ALTER TABLE orders CHANGE COLUMN orders_id orders_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_products CHANGE COLUMN orders_products_id orders_products_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_products_attributes CHANGE COLUMN orders_products_attributes_id orders_products_attributes_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_products_download CHANGE COLUMN orders_products_download_id orders_products_download_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_status_history CHANGE COLUMN orders_status_history_id orders_status_history_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_total CHANGE COLUMN orders_total_id orders_total_id int(10) unsigned NOT NULL auto_increment;
ALTER TABLE paypal_session CHANGE COLUMN unique_id unique_id int(11) NOT NULL auto_increment;
ALTER TABLE paypal CHANGE COLUMN paypal_ipn_id paypal_ipn_id int(11) unsigned NOT NULL auto_increment;
ALTER TABLE paypal_testing CHANGE COLUMN paypal_ipn_id paypal_ipn_id int(11) unsigned NOT NULL auto_increment;
ALTER TABLE paypal_payment_status CHANGE COLUMN payment_status_id payment_status_id int(11) NOT NULL auto_increment;
ALTER TABLE paypal_payment_status_history CHANGE COLUMN payment_status_history_id payment_status_history_id int(11) NOT NULL auto_increment;
ALTER TABLE product_type_layout CHANGE COLUMN configuration_id configuration_id int(11) NOT NULL auto_increment;
ALTER TABLE product_types CHANGE COLUMN type_id type_id int(11) NOT NULL auto_increment;
ALTER TABLE products CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment;
ALTER TABLE products_attributes CHANGE COLUMN products_attributes_id products_attributes_id int(11) NOT NULL auto_increment;
ALTER TABLE products_description CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment;
ALTER TABLE products_options_values_to_products_options CHANGE COLUMN products_options_values_to_products_options_id products_options_values_to_products_options_id int(11) NOT NULL auto_increment;
ALTER TABLE project_version CHANGE COLUMN project_version_id project_version_id tinyint(3) NOT NULL auto_increment;
ALTER TABLE project_version_history CHANGE COLUMN project_version_id project_version_id tinyint(3) NOT NULL auto_increment;
ALTER TABLE query_builder CHANGE COLUMN query_id query_id int(11) NOT NULL auto_increment;
ALTER TABLE record_artists CHANGE COLUMN artists_id artists_id int(11) NOT NULL auto_increment;
ALTER TABLE record_company CHANGE COLUMN record_company_id record_company_id int(11) NOT NULL auto_increment;
ALTER TABLE reviews CHANGE COLUMN reviews_id reviews_id int(11) NOT NULL auto_increment;
ALTER TABLE salemaker_sales CHANGE COLUMN sale_id sale_id int(11) NOT NULL auto_increment;
ALTER TABLE specials CHANGE COLUMN specials_id specials_id int(11) NOT NULL auto_increment;
ALTER TABLE tax_class CHANGE COLUMN tax_class_id tax_class_id int(11) NOT NULL auto_increment;
ALTER TABLE tax_rates CHANGE COLUMN tax_rates_id tax_rates_id int(11) NOT NULL auto_increment;
ALTER TABLE template_select CHANGE COLUMN template_id template_id int(11) NOT NULL auto_increment;
ALTER TABLE zones CHANGE COLUMN zone_id zone_id int(11) NOT NULL auto_increment;
ALTER TABLE zones_to_geo_zones CHANGE COLUMN association_id association_id int(11) NOT NULL auto_increment;
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Looks like I either need to start from scratch a new site or change hosting company's as it would seem to be a I issue with the CrazyDomains server weird though as all worked ok until I had to restore site all my back ups were done correctly as per instructions on ZenCart site for php 5.5 eprox version . So if I rebuild my site and have to restore it I'll just have to keep rebuilding it over and over how much fun . Would seem the CrazyDomains team have no idea what this error is
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Hi mydakota,
I had/have the same issue on a Crazy Domains on a shared server.
I feel it's definitely a CD issue, although they insist is a ZC issue and to talk to the developer about fixing the issue. It happened to my site a little while back, after they updated their servers.
i haven't been able to find a fix for the issue here in the forums or online and my attributes for products currently doesn't work. I have implemented a Neanderthal technology solution, basically advising customers to enter their attribute options in the comments section of the special instructions form of the checkout forms - most do, but now and again a customer forgets or overlooks entering the details and a simple phone call is in order to determine the customer attribute options.
So the bottom line, until I get time to rebuild the site from scratch my Neanderthal solution will have to do.
Good luck sorting out your issue. :)
kind Regards
les :)
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
hi thanks for this info yes its defiantly there servers i was hesitant on using crazy-domains as my host. ill will give them the opportunity to fix the issue before i dedicate my life to warning others with videos and spam bots lol I did find a way to get attributes to work and apply by going into phpmyadmin and under product attributes i find the attribute with a 0 as its id and manually call it something like 22 or similar to the other attributes but not the same then i can add more but have to keep manually change its attribute id in phpmyadmin maybe a easier way for you to at least update your attributes. I will prob be forced down this path but if i have to rebuild my site i will move hosting company's to one that actually can run zen-cart properly. but before i jump the gun ill give them some time to fix this and keep you updated on a possible fix if i find one.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
mydakota,
I was looking back through the information you supplied and did not see php ver or mysql ver
Using ZC v1.5.4 I believe requires the mysqli extentions
You can go to your admin > tools > server/version info and see if msqli is present
BTW: This is not a "bug" so someone might relocate this posting
-
1 Attachment(s)
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Attachment 16080
we are still to determine weather this is a zencart or server issue so could easily be a bug
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
we are still to determine weather this is a zencart or server issue so could easily be a bug
What I think Cobra meant, was that it is not a bug in a default Zen Cart setup, but it may stil be a "bug" in your configuration, but then it should not be in the bugs section of the forum.
Have you tried running your site on a localhost like xampp? if it runs ok there, we could probably rule out an error in the site.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
works fine on my wamp server no issues at all
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Have searched a little more on this issue. The problem described typically comes from the mysql server having the mode: NO_AUTO_VALUE_ON_ZERO set. Review of the settings appears possible through direction offered on the following mysql page: http://dev.mysql.com/doc/refman/5.7/..._value_on_zero
Specifically through a query such as:
Code:
SELECT @@GLOBAL.sql_mode;
SELECT @@SESSION.sql_mode;
Would have to work with the hosting company about disabling the above mode either globally or for you.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
ok by running the query i get this response
NO_AUTO_VALUE_ON_ZERO,ERROR_FOR_DIVISION_BY_ZERO,N...
so seems to be the issue i might try and change the 0 to null and see what happens lol otherwise guess its up to the hosting company to resolve if they even come to the party on that who would know
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
ok by running the query i get this response
NO_AUTO_VALUE_ON_ZERO,ERROR_FOR_DIVISION_BY_ZERO,N...
so seems to be the issue i might try and change the 0 to null and see what happens lol otherwise guess its up to the hosting company to resolve if they even come to the party on that who would know
Changing '0' for NULL may have unwanted implications in the rest of the code. They are not the same thing, and may give different return values in queries, and php code.
I think it is safer to talk to your hosting company
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
I would agree that the best solution (as one has already chimed in as having the same problem with the same host) if staying with this host would be to get the server settings fixed. The best solution for you as a store operator is to find someone that supports ZC/doesnt have this issue.
With regards to a solution associated with staying with this host in absence of them resolving the above issue, I've been looking for a post DrByte made about I think it was Windows servers... Regardless if it was windows or another server, there was something about switching assignments from 0 to null as 0 is a specific "integer" designation, while null is nothing and an auto-increment field should not allow NULL as a value and thus should auto-increment. That said, not including the auto-increment field in the assignment query also would force the auto-increment to occur.
So in this case:
Code:
$db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
values (0,
'" . (int)$products_id . "',
'" . (int)$options_id . "',
If it were modified to:
Code:
$db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
values (
'" . (int)$products_id . "',
'" . (int)$options_id . "',
Removing reference to: products_attributes_id
The problem would not exist in thisquery, but other related queries would also need to be modified.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
ok by running the query i get this response
NO_AUTO_VALUE_ON_ZERO,ERROR_FOR_DIVISION_BY_ZERO,N...
so seems to be the issue i might try and change the 0 to null and see what happens lol otherwise guess its up to the hosting company to resolve if they even come to the party on that who would know
Yours is the only site I've ever seen use that setting in 14 years. Zen Cart was not designed with that setting in mind. You'll need to remove that setting from your MySQL configuration, via your hosting company.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mc12345678
null is nothing and an auto-increment field should not allow NULL as a value and thus should auto-increment. That said, not including the auto-increment field in the assignment query also would force the auto-increment to occur.
Yes, and my nature, an auto-increment field is an integer value. It's *extremely* rare to ever use a 0 in an auto-increment field. It's certainly not something a shared-host should allow as a default.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Lol no luck with them this is one of there responses We apologize that you had to contact us and the team member that was assisting you earlier is asking for the version of your sql and is waiting for a response. Our Specialists stated that the issue was caused by the table itself.
When I called them all they could say as its not a issue with there server/database lol how can it not be when I can use the exact same backups and restore to a different server and it works . I even tryed making a new ZenCart install and just backing up the attribute tables and importing them to my issue site still same results . I now know why they call themselves CrazyDomains lol because of there crazy servers
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
I now know why they call themselves CrazyDomains
When I first read your post I thought you where joking calling them that. But if it's a real name, it wouldn't be on my first choices.
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Doubt the will give my money back but if they don't do the right thing I at least make sure people know to avoid them
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
1. Perhaps you can log a support ticket and ask them to turn off the NO_AUTO_VALUE_ON_ZERO setting, instead of tying it to a specific issue that they've been seeing as "someone else's problem".
2. Or, if you can find out the complete result of this (instead of the chopped-off version which you posted), then we can tell your Zen Cart to use all the rest of the (applicable) settings:
Quote:
Originally Posted by
mydakota
ok by running the query i get this response
NO_AUTO_VALUE_ON_ZERO,ERROR_FOR_DIVISION_BY_ZERO,N...
so seems to be the issue i might try and change the 0 to null and see what happens lol otherwise guess its up to the hosting company to resolve if they even come to the party on that who would know
(Once you post the complete output of that sql_mode query, I'll show you how to tell ZC what to do with those.)
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
magically i get home and start playing and it is fixed hmmmm seems someone has fixed it very strange must have been the hosting company i will try find out what they did to fix it but i guess you guys probably know what they did anyhow but I would like to confirm it .
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
also ran the query again this is all i could get out of it
ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
magically i get home and start playing and it is fixed hmmmm seems someone has fixed it very strange must have been the hosting company i will try find out what they did to fix it but i guess you guys probably know what they did anyhow but I would like to confirm it .
Quote:
Originally Posted by
mydakota
also ran the query again this is all i could get out of it
ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
Ya, it looks like they turned off the NO_AUTO_VALUE_ON_ZERO setting.
FWIW Zen Cart v1.5.5 will include changes to minimize the risk of triggering problems if NO_AUTO_VALUE_ON_ZERO is enabled. (I can't guarantee plugins won't try to use 0-value inserts, but ZC core code should be less likely to trigger that starting with v155).
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Thank you guys for all your help really appreciate it
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mydakota
magically i get home and start playing and it is fixed hmmmm seems someone has fixed it very strange must have been the hosting company i will try find out what they did to fix it but i guess you guys probably know what they did anyhow but I would like to confirm it .
Darn... I was really looking forward to seeing DrByte's proposed solution of how to tell the server to "ignore" this setting.. :) Ohh well, maybe the issue was addressed for webmanstudios as well??? If not, @webmanstudios, suggest having a similar discussion with the host to see if this can be resolved for you as well... No sense in working with ZC in a disabled state when so much more could be possible...
-
Re: PHP Fatal error: 1062uplicate entry '0' for key 'PRIMARY'
Quote:
Originally Posted by
mc12345678
Darn... I was really looking forward to seeing DrByte's proposed solution of how to tell the server to "ignore" this setting.. :)
See: https://github.com/zencart/zencart/c...63400b2c42f4ac