Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Location
    Manchester, UK
    Posts
    27
    Plugin Contributions
    0

    help question Strange problem after upgrade to 1.5.1 cannot add products

    Hi I recently upgraded to 1.5.1 and everything seemed to work fine for a few days until recently when I discovered I can no longer add new products to my site.

    I was using apsona shop admin for a while but then it stopped working and was giving me an error about their being an error in an sql statement. I have written to apsona bug reports and they inform me they are unable to help me for a matter of weeks as they are busy. So I figured I would just start adding my products manually.

    I click the add new product button and am able to enter all the product details and see the preview but when I click the insert button I get the following error "WARNING: An Error occurred, please refresh the page and try again."

    I checked the logs and I can see the following error keeps appearing in the logs.

    [05-Jan-2013 19:04:27 UTC] PHP Warning: require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/lovelust/public_html/store/index.php on line 43

    [05-Jan-2013 19:04:27 UTC] PHP Warning: require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/lovelust/public_html/store/index.php on line 43

    [05-Jan-2013 19:04:27 UTC] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'DIR_WS_TEMPLATEStemplate_default/common/html_header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lovelust/public_html/store/index.php on line 43

    So I started a search on this forum and google and found this error in various posts but none of the fixes seem to work for me. I have checked and double checked my configure.php files but cannot see where the problem is.

    Here are the contents of my admin/includes/configure.php (sensitive info removed)

    Code:
      //define('HTTP_SERVER', 'http://www.example.com');
      define('HTTP_SERVER', 'http://www.lovetolust.com');
      define('HTTPS_SERVER', 'https://enterprise.terrassl.net');
      define('HTTP_CATALOG_SERVER', 'http://www.lovetolust.com');
      define('HTTPS_CATALOG_SERVER', 'https://enterprise.terrassl.net');
    
      // Use secure webserver for catalog module and/or admin areas?
      define('ENABLE_SSL_CATALOG', 'true');
      define('ENABLE_SSL_ADMIN', 'true');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_ADMIN', '/store/myadmfolder/');
      define('DIR_WS_CATALOG', '/store/');
      define('DIR_WS_HTTPS_ADMIN', '/~lovelust/store/myadmfolder/');
      define('DIR_WS_HTTPS_CATALOG', '/~lovelust/store/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
      define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_ADMIN', '/home/lovelust/public_html/store/myadmfolder/');
      define('DIR_FS_CATALOG', '/home/lovelust/public_html/store/');
    
      define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
      define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
      define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
      define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
      define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'myusrname');
      define('DB_SERVER_PASSWORD', 'mypassword');
      define('DB_DATABASE', 'mydbname');
      define('USE_PCONNECT', 'false');
      define('STORE_SESSIONS', 'db');    define('DB_CHARSET', 'latin1');
      // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'none'); 
      define('DIR_FS_SQL_CACHE', '/home/lovelust/public_html/store/cache');
    
    // EOF
    Here are the contents of my includes/configure.php (sensitive info removed)

    Code:
      //define('HTTP_SERVER', 'http://www.example.com');
      define('HTTP_SERVER', 'http://www.lovetolust.com');
      define('HTTPS_SERVER', 'https://enterprise.terrassl.net');
    
      // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'true');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_CATALOG', '/store/');
      define('DIR_WS_HTTPS_CATALOG', '/~lovelust/store/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
      define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    
      define('DIR_WS_PHPBB', '/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/home/lovelust/public_html/store/');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
      define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
      define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'myusrname');
      define('DB_SERVER_PASSWORD', 'mydbserver');
      define('DB_DATABASE', 'mydbname');
      define('USE_PCONNECT', 'false');
      define('STORE_SESSIONS', 'db');    define('DB_CHARSET', 'latin1');
      // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'none'); 
      define('DIR_FS_SQL_CACHE', '/home/lovelust/public_html/store/cache');
    
    // EOF
    I really don't understand what has happened, everything was working for a day or two after upgrading to 1.5.1 then suddenly this happens. Do you think it is a problem with my database?

    I'd appreciate any assistance as I am fairly new to ZenCart and have tried solving this on my own to no avail.

    Thanks

  2. #2
    Join Date
    Jun 2010
    Location
    Manchester, UK
    Posts
    27
    Plugin Contributions
    0

    Default Re: Strange problem after upgrade to 1.5.1 cannot add products

    OK this is strange I renamed the existing html_header.php and uploaded a new one from the zencart install now I get another error, the original error has gone but I am left with this.

    [06-Jan-2013 21:46:36 UTC] PHP Fatal error: 1062: Duplicate entry '2147483647' for key 1 :: insert into zen_products (products_quantity, products_type, products_model, products_price, products_date_available, products_weight, products_status, products_virtual, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, products_image, products_date_added, master_categories_id) values ('0', '1', '111', '1.00', null, '0', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '1', '0', '0', '0', '0', '0', '', now(), '36') in /home/lovelust/public_html/store/includes/classes/db/mysql/query_factory.php on line 120

 

 

Similar Threads

  1. Unable to add products or categories after 1.5.4 upgrade.
    By racinjason in forum Upgrading to 1.5.x
    Replies: 10
    Last Post: 10 Sep 2015, 04:56 AM
  2. Replies: 1
    Last Post: 20 Jan 2014, 02:57 PM
  3. Cannot add to cart and cannot login after htaccess change
    By ironchef in forum General Questions
    Replies: 1
    Last Post: 17 Dec 2012, 11:23 PM
  4. Blank page when trying to Add New Products after recent upgrade
    By carigrafix in forum General Questions
    Replies: 1
    Last Post: 15 Jul 2011, 08:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg