Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Duplicate Entry


Recommended Posts

I had an OsCommerce installed working great. But webhosting changed (at least) the document root from








I got this error creating a new product:


1062 - Duplicate entry '0' for key 1


insert into products (products_quantity, products_model, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) values ('', '', '', null, '', '1', '0', '', now())


on https://<host>/shop/admin/categories.php?cPath=59&action=insert_product&osCAdminID=80288dab82b873102bdfc5339aa7372b


Maybe they changed something else.


Any idea?



Link to comment
Share on other sites

Fist off this URL https://<host>/shop/admin/categories.php look odd.


1. Why is it https when this is Admin?


2. The <host> looks odd.


Go to Tools Server Info and check what version of php you are running and also look at the document root and check.



Also post the first 10 lines of your Admin configure.php file.

Link to comment
Share on other sites

Thanks for replying!


1. It's https beacuse client wanted it


2. Privacy


Php version is quite old: 4.3.9


Configure.php first 10 lines

  define('HTTP_SERVER', 'http://<host>'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://<host>');
 define('HTTPS_CATALOG_SERVER', 'http://<host>');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/<host>/httpdocs/shop/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/shop/admin/'); // absolute path required
 define('DIR_FS_ADMIN', '/var/www/vhosts/<host>/httpdocs/shop/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/shop/'); // absolute path required
 define('DIR_FS_CATALOG', '/var/www/vhosts/<host>/httpdocs/shop/'); // absolute path required
 define('DIR_WS_IMAGES', 'images/');

So I guess I have to make changes in this file, right?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...