Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40
  1. #31
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d counter history broke after restoring site from backup

    I didnt edit it? I wouldnt have a clue. So, I cant say for sure.

  2. #32
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1.3.9d counter history broke after restoring site from backup

    If the file has no line-breaks, then it's very possible that it's not getting executed because it probably has a double-slash in it for comments someplace, and thus everything after that is getting skipped, which would explain all the problems.

    I'm not sure what software you're using to unzip, or to edit, or to upload/FTP, or to download/FTP, or to view files on your server. But something's bad.

    And if it's treating ALL your files like that, then you're certainly going to have problems all over your site.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #33
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d counter history broke after restoring site from backup

    Which file is correct? The one I posted above with line breaks or this one:

    Code:
    <?php
    /**
     * counter.php
     *
     * @package general
     * @copyright Copyright 2003-2009 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: counter.php 16091 2010-04-27 21:46:02Z wilt $
     * @private
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    if (isset($_SESSION['session_counter']) && $_SESSION['session_counter'] == true) {
      $session_counter = 0;
    } else {
      $session_counter = 1;
      $_SESSION['session_counter'] = true;
    }
    $date_now = date('Ymd');
    $counter_query = "select startdate, counter, session_counter from " . TABLE_COUNTER_HISTORY . " where startdate='" . $date_now . "'";
    $counter = $db->Execute($counter_query);
    $sql = "INSERT IGNORE INTO " . TABLE_COUNTER_HISTORY . " (startdate, counter, session_counter) values ('" . $date_now . "', '1', '1')";
    $db->Execute($sql);
    $sql = "SELECT * FROM "  . TABLE_COUNTER_HISTORY . " WHERE startdate = '" .  $date_now . "' AND counter = 1 AND session_counter = 1 LIMIT 1";
    $result = $db->execute($sql);
    if ($result->recordCount() <=0 || $counter->RecordCount() > 0 )
    {
      $counter_startdate = $counter->fields['startdate'];
      $counter_now = ($counter->fields['counter'] + 1);
      $session_counter_now = ($counter->fields['session_counter'] + $session_counter);
      $sql = "update " . TABLE_COUNTER_HISTORY . " set counter = '" . $counter_now . "', session_counter ='" . $session_counter_now . "' where startdate='" . $date_now . "'";
     
      $db->Execute($sql);
    }
    $counter_query = "select startdate, counter from " . TABLE_COUNTER;
    $counter = $db->Execute($counter_query);
    if ($counter->RecordCount() <= 0) {
      $date_now = date('Ymd');
      $sql = "insert into " . TABLE_COUNTER . " (startdate, counter) values ('" . $date_now . "', '1')";
      $db->Execute($sql);
      $counter_startdate = $date_now;
      $counter_now = 1;
    } else {
      $counter_startdate = $counter->fields['startdate'];
      $counter_now = ($counter->fields['counter'] + 1);
      $sql = "update " . TABLE_COUNTER . " set counter = '" . $counter_now . "'";
      $db->Execute($sql);
    }
    $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));
    The reason I am asking is,if I open this file on either my working site or my test site on a different pc, this is the exact code I see. But the code I pasted earlier is what I see on the working site or the test site using my new pc.. so, either way, the code is the same? Im really confused at this time!!
    Last edited by countingsheep; 29 Jun 2010 at 07:36 PM. Reason: Additional data

  4. #34
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d counter history broke after restoring site from backup

    UPDATE - I just checked on my new laptop, the same file in Adobe Dreamweaver and in Macromedia Dreamweaver, and Macromedia dreamweaver shows the exact code as this message. So, if this code is correct, then it isnt the file that is wrong? But, I must have a setting off in Adobe... yet that wont remedy the problem with the counter...

    Also, I have gone through all of the files again, using winmerge and am ready to try this again. So, what I plan to do, is delete all the files on my test site and reupload everything... do I need to upload the install files? My database is at 1.3.9c now?

  5. #35
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1.3.9d counter history broke after restoring site from backup

    Quote Originally Posted by countingsheep View Post
    UPDATE - I just checked on my new laptop, the same file in Adobe Dreamweaver and in Macromedia Dreamweaver, and Macromedia dreamweaver shows the exact code as this message. So, if this code is correct, then it isnt the file that is wrong? But, I must have a setting off in Adobe... yet that wont remedy the problem with the counter...
    If the file *on the server* doesn't have the requisite line-breaks, then you're going to have problems. It doesn't matter what it looks like on your PC. It's the server that matters. If your dreamweaver app is breaking the files as it uploads them (common problem with dw), then that may be your culprit.

    Dreamweaver's FTP is sketchy at best, both windoze and mac versions.

    Quote Originally Posted by countingsheep View Post
    ... So, what I plan to do, is delete all the files on my test site and reupload everything... do I need to upload the install files? My database is at 1.3.9c now?
    Since your database is already updated, you don't need the zc_install steps.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #36
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d counter history broke after restoring site from backup

    Im pretty certain the line breaks are there. It is only in the adobe program that I see it incorrectly.

    Typically I use an ftp program like wsftp995 to load all of the files. However it seems like I have to go back and reload the images because they are distorted from not loading as a binary..

  7. #37
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d counter history broke after restoring site from backup

    Hey, I wanted to let you know what I have now:


    Ok, here on my test site... I have 3 directories:


    first directory:
    all looks the public side...
    but in the admin I get the internal server error.
    second directory:
    I have a new zen cart set up in there that has no changes and it is fully functioning.
    Third Directory
    Then I have another one... which I have tried to upgrade the database to and connect it to her database, and I have the public side working, with her products showing in there... (images arent because I didnt load them)
    but the admin gives me this info (*note, I have checked the configure.php files and couldnt see anything I had wrong, but that doesnt mean it isnt wrong... it just means I have looked at it too many times! I have also ran the install twice, to doublecheck and it says there are no upgrades needed.) :
    Hello. Thank you for loading Zen Cart™.
    You are seeing this page for one or more reasons:
    1.This is your first time using Zen Cart™ and you haven't yet completed the normal Installation procedure.
    If this is the case for you, you will need to upload the "zc_install" folder using your FTP program, and then run zc_install/index.php via your browser (or reload this page to see a link to it).

    2.Your /includes/configure.php and/or /admin/includes/configure.php file contains invalid path information and/or invalid database-connection information.
    If you recently edited your configure.php files for any reason, or maybe moved your site to a different folder or different server, then you'll need to review and update all your settings to the correct values for your server.
    See the Online FAQ and Tutorials area on the Zen Cart™ website for assistance.

    To begin installation ...
    1.The Installation Documentation can be read by clicking here: Documentation
    2.You will need to upload the "zc_install" folder using your FTP program, and then run zc_install/index.php via your browser (or reload this page to see a link to it).
    3.The Online FAQ and Tutorials area on the Zen Cart™ website will also be of value if you run into difficulties.
    Copyright © 2003-2010 Zen Cart™

  8. #38
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d problems after restoring site from backup

    Anyone? I have gone through any threads I can find on internal server errors, and nothing has been successful, ran the install again just in case? nothing...

    On the setup one, I have gone through the configure.php files til I am blue in the face and crosseyed... nothing there I can find.. ran the fix_cache_key and no luck.

    Even a hint would be helpful of where to fix this. I cant move on to anything else with this holding over my head!

  9. #39
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d counter history broke after restoring site from backup

    Here is my configure.php file from includes/

    <?php
    /**
    * @package Configuration Settings circa 1.3.8
    * @copyright Copyright 2003-2007 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    */

    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
    // Define the webserver and path parameters
    // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
    // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
    define('HTTP_SERVER', 'http://mydomain.com');
    define('HTTPS_SERVER', 'https://mydomain.com');
    // Use secure webserver for checkout procedure?
    define('ENABLE_SSL', 'false');
    // 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', '/babysewcute/');
    define('DIR_WS_HTTPS_CATALOG', '/babysewcute/');
    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/wahmcoup/public_html/babysewcute/');
    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', 'wahmcoup_XXXXXX');
    define('DB_SERVER_PASSWORD', 'XXXXXX);
    define('DB_DATABASE', 'wahmcoup_XXXXXX');
    define('USE_PCONNECT', 'false'); // use persistent connections?
    define('STORE_SESSIONS', 'db'); // 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/wahmcoup/public_html/babysewcute/cache');
    // EOF





    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    my /admin/includes/configure.php (yes, it's actually correctly renamed)

    <?php
    /**
    * @package Configuration Settings circa 1.3.8
    * @copyright Copyright 2003-2007 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    */

    /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
    // Define the webserver and path parameters
    // Main webserver: eg-http://www.your_domain.com -
    // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
    // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
    /*
    * URLs for your site will be built via:
    * HTTP_SERVER plus DIR_WS_ADMIN or
    * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
    * HTTP_SERVER plus DIR_WS_CATALOG or
    * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
    * ...depending on your system configuration settings
    *
    * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following:
    */
    define('HTTP_SERVER', 'http://mysite.com');
    define('HTTPS_SERVER', 'https://mysite.com');
    define('HTTP_CATALOG_SERVER', 'http://mysite.com');
    define('HTTPS_CATALOG_SERVER', 'https://mysite.com');
    // Use secure webserver for catalog module and/or admin areas?
    define('ENABLE_SSL_CATALOG', 'false');
    define('ENABLE_SSL_ADMIN', 'false');
    // 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', '/babysewcute/admin/');
    define('DIR_WS_CATALOG', '/babysewcute/');
    define('DIR_WS_HTTPS_ADMIN', '/babysewcute/admin/');
    define('DIR_WS_HTTPS_CATALOG', '/babysewcute/');
    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/wahmcoup/public_html/babysewcute/admin/');
    define('DIR_FS_CATALOG', '/home/wahmcoup/public_html/babysewcute/');
    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', 'wahmcoup_XXXXXX');
    define('DB_SERVER_PASSWORD', 'XXXXXX');
    define('DB_DATABASE', 'wahmcoup_XXXXXX');
    define('USE_PCONNECT', 'false'); // use persistent connections?
    define('STORE_SESSIONS', 'db'); // 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', 'database');
    define('DIR_FS_SQL_CACHE', '/home/wahmcoup/public_html/babysewcute/cache');
    // EOF

  10. #40
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1.3.9d problems after restoring site from backup

    Ignore this for now, I Am so tired I dont know what I did if someone else ran into the problem, but I think I have it fixed in one of the directories. 1.3.9d ... I have to put in the custom files and I think I have it! Will let you know if so.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. v150 Cant Access my Admin Page after restoring from backup
    By nelly7 in forum General Questions
    Replies: 8
    Last Post: 20 Jun 2014, 09:18 AM
  2. No Admin After Restoring Database & Store Backup Files
    By eulador in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 18 Jul 2011, 06:11 AM
  3. Restoring From BackUp
    By QuickInks in forum General Questions
    Replies: 1
    Last Post: 12 Feb 2009, 10:31 PM
  4. Replies: 1
    Last Post: 26 Jan 2009, 01:15 PM
  5. restoring database from backup
    By dni in forum General Questions
    Replies: 1
    Last Post: 5 Nov 2007, 03:34 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR