Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Sep 2015
    Location
    Upper Hutt
    Posts
    13
    Plugin Contributions
    0

    Default Re: Cannot delete users from within admin

    I've just copied the admin folder across again (saving the configure.php) but it's made no difference.

    here are the configure files.


    Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.4
     * @copyright Copyright 2003-2014 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * File Built by zc_install on 2015-09-24 09:08:51
     */
    
    
    /*************** 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.      ***********/
    
    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      define('HTTP_SERVER', 'http://www.ianschofer.co.nz');
      define('HTTPS_SERVER', 'https://www.ianschofer.co.nz');
      define('HTTP_CATALOG_SERVER', 'http://www.ianschofer.co.nz');
      define('HTTPS_CATALOG_SERVER', 'https://www.ianschofer.co.nz');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'true');
    
      define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_CATALOG', '/');
      define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
    // 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_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)
      define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/'));
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/var/sentora/hostdata/riobravo/public_html/schofield/');
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      define('DIR_FS_LOGS', '/var/sentora/hostdata/riobravo/public_html/schofield/logs');
    
      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
    
    removed for public posting
    
    
      // 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', '/var/sentora/hostdata/riobravo/public_html/schofield/cache');
    
    
    // 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
       */
    // EOF
    Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.4
     * @copyright Copyright 2003-2014 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * File Built by zc_install on 2015-09-24 09:08:51
     */
    
    
    /*************** 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.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      define('HTTP_SERVER', 'http://www.ianschofer.co.nz');
      define('HTTPS_SERVER', 'https://www.ianschofer.co.nz');
    
      // 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', '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
      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', '/var/sentora/hostdata/riobravo/public_html/schofield/');
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      define('DIR_FS_LOGS', '/var/sentora/hostdata/riobravo/public_html/schofield/logs');
    
      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
    
    removed for public posting
    
    
      // 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', '/var/sentora/hostdata/riobravo/public_html/schofield/cache');
    
    // EOF

  2. #12
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Cannot delete users from within admin

    Quote Originally Posted by _Vince View Post
    I've just copied the admin folder across again (saving the configure.php) but it's made no difference. ...
    Copied from the local development environment (to a new folder on the server)? Or copied from the Zen Cart distribution zip (to a new folder on the server)?

    You have removed from both configure.php files the lines for DB_PREFIX, DB_CHARSET, and DB_DATABASE. These are not sensitive information. Are these the same in both files? Are they correct for the server?

    Does the DB_CHARSET match the collation used by the Zen Cart database tables on the server (are the tables using latin1_general_ci if set to latin1 or utf8_general_ci if using utf8)?


    Quote Originally Posted by _Vince View Post
    ... #777 is the customer ID, as displayed in the admin panel. ... Whatever customer I try to delete, the ID is given as 0. ...
    So in the database (and in the Zen Cart admin page "/customers.php") the ID assigned to a user is 777. Has this been verified by manually checking the database table "customers"?

    What is the cID shown in the URL for deleting user 777 (hover over the delete button)?

    In the Zen Cart Admin Activity Log (HTML view, not download), for the rows with "customers.php" what parameters and postdata do you see?

    Example 1: "page=1&cID=1&action=update&"
    Code:
    stdClass Object
    (
    [default_address_id] => 1
    [customers_gender] => m
    [customers_authorization] => 0
    [customers_firstname] => Bill
    [customers_lastname] => Smith
    [customers_dob] => 01/01/2001
    [customers_email_address] => [email protected]
    [entry_company] => JustaDemo
    [entry_street_address] => 123 Any Avenue
    [entry_suburb] =>
    [entry_postcode] => 12345
    [entry_city] => Here
    [entry_state] => California
    [entry_country_id] => 223
    [customers_telephone] => 12345
    [customers_fax] =>
    [customers_email_format] => TEXT
    [customers_newsletter] => 0
    [customers_group_pricing] => 0
    [customers_referral] =>
    )
    Example 2: "page=1&cID=1&action=confirm&"
    Code:
    
    
    Example 3: "page=1&action=deleteconfirm&",
    Code:
    stdClass Object
    (
    [cID] => 2
    )

    Quote Originally Posted by _Vince View Post
    ... If you've upgraded, HOW did you upgrade? (official upgrade procedure or an automated script from your hosting company?)

    I installed ZC then loaded the old database and ran the update script. ...
    Please explain further.

    Did you upgrade a copy of the database? Did you attempt to selectively carry over portions of the database before upgrading the database? Did you export / import specific tables before upgrading the database? Did you export / import the entire database upgrading the database? If doing an export / import via phpMyAdmin (or similiar) before upgrading the database, did you disable "partial" export / imports? Did you check the database tables for errors (and / or run repairs) before exporting?

    Did you overwrite the existing files with new (or did you start with an empty folder on the server)? Did you determine what changes were present in the old version and manually merge those changes into into the new files? Did you follow the instructions to Rebuild on the New Version?


    Quote Originally Posted by _Vince View Post
    ... What plugins/addons have you installed? When? If your problems are payment-related, what payment module(s) are you using? If it's shipping-related, which shipping module(s) are you using?

    No addons or modules. just a very simple template. ...
    So there are zero changes, modifications, or overrides present?


    Quote Originally Posted by lhungil View Post
    ... What is the value of "admin" -> "configuration" -> "sessions" -> "session directory"?
    Answer please. This value (location of the session write directory) is stored in the database. If you are coping the database from the local installation to the server installation by just exporting the local database and importing to the server database, the value may be incorrect (and need to be updated) on the server. If the site was migrated, this value may also need to be upgraded.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #13
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: Cannot delete users from within admin

    Hi
    I see you have your cache set to get the path from the database and not the configure.php file, which might account for that error message. Not sure if it will fix the main problem, but try changing it to 'file'
    .

    Lruskauff

  4. #14
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Cannot delete users from within admin

    As I said possibly another random guess even though lhungil is going down a very clear path to ensure clarity and conciseness.. I was wondering if there is any cache related information in the php.ini file (if one exists) and if so, if that path is present... But please, consider the information/post above as this is simply something else to possibly consider after all that...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #15
    Join Date
    Sep 2015
    Location
    Upper Hutt
    Posts
    13
    Plugin Contributions
    0

    Default Re: Cannot delete users from within admin

    Quote Originally Posted by lhungil View Post
    Copied from the local development environment (to a new folder on the server)? Or copied from the Zen Cart distribution zip (to a new folder on the server)?
    Copied from the distribution zip. But since then (this afternoon), I have recopied a lot of the files in case there was some glitch during the FTP transfer.

    Quote Originally Posted by lhungil View Post
    You have removed from both configure.php files the lines for DB_PREFIX, DB_CHARSET, and DB_DATABASE. These are not sensitive information. Are these the same in both files? Are they correct for the server?
    Yes, they are the same, and I think they are correct because the site displays products, clients, etc correctly so it's definitely connecting to the right database and tables.

    Quote Originally Posted by lhungil View Post
    Does the DB_CHARSET match the collation used by the Zen Cart database tables on the server (are the tables using latin1_general_ci if set to latin1 or utf8_general_ci if using utf8)?
    Hadn't thought of that. It was set on the DB to latin1_swedish_ci, so I've changed the configure files to match.

    Quote Originally Posted by lhungil View Post
    So in the database (and in the Zen Cart admin page "/customers.php") the ID assigned to a user is 777. Has this been verified by manually checking the database table "customers"?
    Yes, it has.

    Quote Originally Posted by lhungil View Post
    What is the cID shown in the URL for deleting user 777 (hover over the delete button)?
    777, as expected.

    Quote Originally Posted by lhungil View Post
    In the Zen Cart Admin Activity Log (HTML view, not download), for the rows with "customers.php" what parameters and postdata do you see?
    Well, that's part of the problem. I can't get it to output as HTML, same as I can't get the admin to delete customers or change anything. It's like there's something missing between the user interface and the PHP that actually does things.


    Quote Originally Posted by lhungil View Post
    Did you upgrade a copy of the database? Did you attempt to selectively carry over portions of the database before upgrading the database? Did you export / import specific tables before upgrading the database? Did you export / import the entire database upgrading the database? If doing an export / import via phpMyAdmin (or similiar) before upgrading the database, did you disable "partial" export / imports? Did you check the database tables for errors (and / or run repairs) before exporting?
    What I did was: export a copy of the 1.3x database import it onto the development machine's phpMyAdmin, then run the upgrade. After which, when the ZC was installed on the live server, I imported the upgraded DB.


    Quote Originally Posted by lhungil View Post
    Did you overwrite the existing files with new (or did you start with an empty folder on the server)?
    Empty folder. It's a different server, which is why having old paths mentioned in the .log files is so odd. But I haven't actually seen any new .log files since this morning. Is this normal? Is there a limit to the number of .log files ZC will create?


    Quote Originally Posted by lhungil View Post
    Did you determine what changes were present in the old version and manually merge those changes into into the new files? Did you follow the instructions to Rebuild on the New Version?
    It wasn't really possible. The previous web person wasn't sure of what (if any) changes had been made, the site owner couldn't remember any. Thanks for the link, I will look at that now.


    Quote Originally Posted by lhungil View Post
    So there are zero changes, modifications, or overrides present?
    As far as I can know, no.

    Quote Originally Posted by lhungil View Post
    Answer please. This value (location of the session write directory) is stored in the database. If you are coping the database from the local installation to the server installation by just exporting the local database and importing to the server database, the value may be incorrect (and need to be updated) on the server. If the site was migrated, this value may also need to be upgraded.
    For sure. The record with configuration_key SESSION_WRITE_DIRECTORY has a configuration_value of /var/sentora/hostdata/riobravo/public_html/schofield/cache




    I think I will reinstall everything and see what happens. It couldn't be any worse than it is right now.
    Last edited by _Vince; 28 Sep 2015 at 08:17 AM.

  6. #16
    Join Date
    Sep 2015
    Location
    Upper Hutt
    Posts
    13
    Plugin Contributions
    0

    Default Re: Cannot delete users from within admin

    In the end, the easiest and quickest thing was just to save the database, reload all of ZC, then import the saved database and template.

    It's working now, except for a problem with the email, but that's a different story.

    Thank you very much for all your help, people.

  7. #17
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Cannot delete users from within admin

    Quote Originally Posted by _Vince View Post
    ... What I did was: export a copy of the 1.3x database import it onto the development machine's phpMyAdmin, then run the upgrade. After which, when the ZC was installed on the live server, I imported the upgraded DB. ...
    This could be problematic. In some case phpMyAdmin can fail to fully export or import the data (depending upon selected settings and server configuration)... Sometimes using mysql_dump and similiar locally is more reliable.

    Another potential problem can occur if the test environment does not exactly match the production environment. In Zen Cart 1.5.3+ the password encryption scheme can vary on different versions of PHP (resulting in failed logins / requiring admins and users reset passwords).

    So basically, it is usually best practice to always backup the production DB (or copy to a staging DB) first. Then you can test the database upgrade and make any necessary file changes (and document - along with document any plugin installation and extra required steps). After everything looks good, one can then update the files on the production server (and run the database upgrade again against the production copy - and perform any database related changes identified during development on the test server).

    The steps outlined in Rebuild on New Version tend to work best, especially when moving from one major version to another (for example from 1.3 to 1.5).


    Quote Originally Posted by _Vince View Post
    ... Empty folder. It's a different server, which is why having old paths mentioned in the .log files is so odd. But I haven't actually seen any new .log files since this morning. Is this normal? Is there a limit to the number of .log files ZC will create? ...
    No limit on the number of .log files Zen Cart will create (although some cheap hosting providers may limit the number of files allowed to be stored on a shared server).

    If you are no longer receiving new log files related to the path issue, most likely it has been sorted. As we have now checked 90% of the places where the path could come from (and all appear good), I'd not worry about it. Could even have been the hosting provider caching some of the ".php" files (some providers do - and it can take awhile for changes to propagate).


    Quote Originally Posted by _Vince View Post
    ... It wasn't really possible. The previous web person wasn't sure of what (if any) changes had been made, the site owner couldn't remember any. ...
    One can always download a "clean" copy of the old version and compare all of the files against the files (from the old version) on the server. Kinda messy without a good comparison / merge tool, but there are some relatively inexpensive (and free) ones out there. While the article on "Troubleshooting Obscure Issues" is not an exact match, the basic process is outlined.


    Quote Originally Posted by _Vince View Post
    ... I think I will reinstall everything and see what happens. It couldn't be any worse than it is right now.
    Quote Originally Posted by _Vince View Post
    In the end, the easiest and quickest thing was just to save the database, reload all of ZC, then import the saved database and template.

    It's working now, except for a problem with the email, but that's a different story. ...
    Glad you were able to get things sorted (and thank you for letting us know).

    May want to look into converting the database tables to UTF8 after the upgrade, will avoid some potential issues if the store ever needs to support non latin-1 characters (or contains any content with non latin-1 characters). This can range from trivial (for a store previously only using latin-1 characters) to pain in the rear (multilingual stores using non latin-1 characters and multiple different character sets). Here is a related article: Should I Convert From iso-8859-1 to utf8?

    Would strongly suggest using SMTPAUTH for your email (unless your provider blocks the necessary ports), much easier to debug and lower chance of emails being flagged as spam.


    NOTE: My next step was going to be to ask you to install a "clean" copy of Zen Cart on the server in a new folder and database (with test data) to see if the same problems still occurred, or if there was an issue with something related to the current installation of Zen Cart (files + database). While Zen Cart usually will run on most modern hosting providers without any major issues, once in a blue moon (usually on really cheap providers) the hosting provider's environment is not compatible.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: 26 Jun 2015, 10:02 PM
  2. Disable "DELETE" - Make certain admin users not able to delete orders
    By vetpro in forum Managing Customers and Orders
    Replies: 0
    Last Post: 12 Nov 2011, 02:01 PM
  3. Cannot access Customer within Admin
    By imiq in forum General Questions
    Replies: 1
    Last Post: 13 Jul 2010, 12:24 PM
  4. emailing from within admin
    By moodle in forum General Questions
    Replies: 0
    Last Post: 12 Feb 2009, 01:57 PM

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