Forums / General Questions / Cannot delete users from within admin

Cannot delete users from within admin

Views: 1,866

Results 1 to 17 of 17
27 Sep 2015, 8:37 PM
#1
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

Cannot delete users from within admin

v1.5.4 on Linux. I am using SSL on everything.

I am trying to create and delete test users from within the admin section.

And I can't. I click on the user, I get the panel with the user details, and when I choose to delete... nothing happens.

Oddly, if I choose "edit", I get the customer details form/page but if I press "update", all the fields go blank and ZC complains about missing mandatory fields.

When I look at the log, I see that I have been attempting to delete a user with ID = 0 rather than 777 as it should be.

Any ideas on what could be wrong?

27 Sep 2015, 9:04 PM
#2
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

Re: Cannot delete users from within admin

Oh, and if I try to delete an Admin user, I am told "The option that you requested cannot be undertaken without specifying a user"

so it looks like the ID=0 problem again? What can I do? What have I not done?

27 Sep 2015, 9:17 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot delete users from within admin

There are several questions that can be asked back to try to resolve this, a majority of them though are the same as requested to be provided as shown when a user selects to post/write a message to the forum. Called the posting tips.

Answering them will help to identify why 1) all of your admin users are being assigned an id of 0, 2) if not assigned an id of 0, why the particular admin edit sections are not obtaining the correct value or why they are passing along a value of 0 when trying to modify the user. The use of 777 is that a number that was seen as related to one of the numerous users created, or is that a number "expected" (typically associated with the permissions of a file or directory and just wanting to make sure that we're all talking about the same expectation.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

27 Sep 2015, 10:05 PM
#4
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

Re: Cannot delete users from within admin

mc12345678:

The use of 777 is that a number that was seen as related to one of the numerous users created, or is that a number "expected" (typically associated with the permissions of a file or directory and just wanting to make sure that we're all talking about the same expectation.)

No, #777 is the customer ID, as displayed in the admin panel. Nothing to do with file permissions.

Whatever customer I try to delete, the ID is given as 0.

Looking in the logs, I see that somehow, it's trying to use a bad path. Is that right?

[27-Sep-2015 10:54:13 Pacific/Auckland] PHP Warning: session_save_path(): open_basedir restriction in effect. File(/home/ianschof/public_html/new_shop/cache) is not within the allowed path(s): (/var/sentora/hostdata/riobravo/public_html/schofield:/var/sentora/temp/) in /var/sentora/hostdata/riobravo/public_html/schofield/includes/functions/sessions.php on line 155

I have no idea where it's getting "/home/ianschof/public_html/new_shop/cache" from (2nd line, for example).

I'll chase up the open_basedir thing now, but where does Zen Cart set the cache path?

The record in the configuration table (configuration_key SESSION_WRITE_DIRECTORY) doesn't mention that path at all.

27 Sep 2015, 10:39 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot delete users from within admin

_Vince:

No, #777 is the customer ID, as displayed in the admin panel. Nothing to do with file permissions.

Whatever customer I try to delete, the ID is given as 0.

Looking in the logs, I see that somehow, it's trying to use a bad path. Is that right?

[27-Sep-2015 10:54:13 Pacific/Auckland] PHP Warning: session_save_path(): open_basedir restriction in effect. File(/home/ianschof/public_html/new_shop/cache) is not within the allowed path(s): (/var/sentora/hostdata/riobravo/public_html/schofield:/var/sentora/temp/) in /var/sentora/hostdata/riobravo/public_html/schofield/includes/functions/sessions.php on line 155

I have no idea where it's getting "/home/ianschof/public_html/new_shop/cache" from (2nd line, for example).

I'll chase up the open_basedir thing now, but where does Zen Cart set the cache path?

The record in the configuration table (configuration_key SESSION_WRITE_DIRECTORY) doesn't mention that path at all.

Two places, includes/configure.php and admin/includes/configure.php

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

27 Sep 2015, 11:34 PM
#6
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

Re: Cannot delete users from within admin

Yep, I've had a look at those but the path is not in either of them.

27 Sep 2015, 11:46 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot delete users from within admin

_Vince:

Yep, I've had a look at those but the path is not in either of them.

So back to my first post: origin of database, origin of fileset, how installed, all of the thngs in the postng tips, otherwise going to be throwing a lot of guesses as this is not the daily issues experienced by so many others... Need a framework from which to offer reasonable suggestions even if just guesses.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

27 Sep 2015, 11:54 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Cannot delete users from within admin

Here, in case there's any wondering about what they are, they are quoted below:

Have you already posted about this issue? If so, DO NOT POST a duplicate. Instead, reply to your existing post, with MORE information.
NOTE: When making a new post, be sure to include relevant information such as:
What version of Zen Cart are you using?
Has your site been upgraded? When? From what version(s)?
If you've upgraded, HOW did you upgrade? (official upgrade procedure or an automated script from your hosting company?)
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?
If your problems are language-pack related (non-English), have you checked that all the language files are loaded and correct?
HOW did you install Zen Cart? (upload via FTP and run zc_install, or a one-click install from your hosting company? (one-click installs might mean you don't have enough information about your site/server to make customizations easily))
What version of PHP and MySQL is your server using? (See Admin->Tools->Server Info)
WHEN did the problem "start"? How does that compare with other events of your hosting company, changes you've made to your site files/addons, or your admin settings, etc?
Please post the contents of related "debug logs" generated by Zen Cart (wrap the content in ```
and

> If this is your first store, have you tested all aspects of transactions before going live?
> In what ways is your site customized or different from a brand new uncustomized install?
> Please post your site URL* so we can take a look at it. This is especially important if you're encountering display/layout problems, so the problem can be seen directly.
> If you're encountering problems that could be related to your server or hosting company, include the name of your hosting company (not their URL).
> HAVE YOU LOOKED IN THE FAQ AREA for answers to your question? (ie: a search for your error message or what you want to edit/change, etc)
> Have you searched the FORUM for your error message or for answers to the question you're asking?
> 
> Also read the "Before You Post" and "Forum Do's and Don'ts" to be sure you provide at least the basics of information in your post. The more detail you supply, the more likely you'll get a usable answer. If you don't give enough information then you'll likely just get a reply asking for more info, or worse: no reply at all. We'd rather give excellent answers than have to ask you more questions!
> 
> *NOTE: Search engines index this Zen Cart® support site very quickly. Posting your URL will cause your site and your post to show up in search engines. If you want to prevent that, put spaces between each letter of the domain name in your URL.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Sep 2015, 12:08 AM
#9
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

Re: Cannot delete users from within admin

Ok, here we go then...

And thanks for the quick replies.

What version of Zen Cart are you using?

1.5.4

Has your site been upgraded? When? From what version(s)?

1.3x (?) not sure.

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.

*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.

HOW did you install Zen Cart? (upload via FTP and run zc_install

yes

What version of PHP and MySQL is your server using? (See Admin->Tools->Server Info)*

Server Host: sentora.dynamite.net.nz (103.16.181.36)
Database Host: localhost (103.16.181.36)
Server OS: Linux 3.12.27-xenU
Database: MySQL 5.5.44-0ubuntu0.14.04.1
Server Date: 09/28/2015 13:01:58
Database Date: 09/28/2015 13:01:58
Server Up Time: 13:01:58 up 31 days, 16:42, 0 users, load average: 1.50, 1.49, 1.54
HTTP Server: Apache
PHP Version: 5.5.9-1ubuntu4.12 (Zend: 2.5.0)
PHP Memory Limit: 128M PHP Safe Mode: Off
PHP File Uploads: On
Max Size: 50M POST Max Size: 50M
Database Data Size: 1,487 kB
Database Index Size: 736 kB

*WHEN did the problem "start"? *
As soon as I tried updating users. A development version of the site on a local Linux machine has no problems.

Please post the contents of related "debug logs" generated by Zen Cart (wrap the content in

[27-Sep-2015 10:54:37 Pacific/Auckland] PHP Warning:  file_exists(): open_basedir restriction in effect. File(/home/ianschof/public_html/new_shop/cache) is not within the allowed path(s): (/var/sentora/hostdata/riobravo/public_html/schofield:/var/sentora/temp/) in /var/sentora/hostdata/riobravo/public_html/schofield/mgmnt/includes/init_includes/init_cache_key_check.php on line 15

[27-Sep-2015 10:54:13 Pacific/Auckland] PHP Warning:  session_save_path(): open_basedir restriction in effect. File(/home/ianschof/public_html/new_shop/cache) is not within the allowed path(s): (/var/sentora/hostdata/riobravo/public_html/schofield:/var/sentora/temp/) in /var/sentora/hostdata/riobravo/public_html/schofield/includes/functions/sessions.php on line 155

[27-Sep-2015 10:54:12 Pacific/Auckland] PHP Warning:  session_save_path(): open_basedir restriction in effect. File(/home/ianschof/public_html/new_shop/cache) is not within the allowed path(s): (/var/sentora/hostdata/riobravo/public_html/schofield:/var/sentora/temp/) in /var/sentora/hostdata/riobravo/public_html/schofield/includes/functions/sessions.php on line 155
28 Sep 2015, 1:47 AM
#10
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Cannot delete users from within admin

Please verify the files on the server (for the admin) are an exact copy of the Zen Cart 1.5.4 distribution's admin folder (no modifications, no missing files, no extra files, etc).

What is the value of "admin" -> "configuration" -> "sessions" -> "session write directory"? This is used when you have configured Zen Cart to not use the database for STORE_SESSIONS (in the configure.php).

Post both "/includes/configure.php" and "/your_admin_folder/includes/configure.php" (from the server, not local development). Please use code tags around each file's contents (press the # button in the editor when replying - desktop version of the site). EX: ```
[CODE]contents of the file[/CODE]


Also post the contents of "/includes/local/configure.php" and "/your_admin_folder/includes/local/configure.php" from the server if present (again wrap with code tags).

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

28 Sep 2015, 2:24 AM
#11
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

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.

<?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
<?php
/**
 * @package Configuration Settings circa 1.5.4
 * @copyright Copyright 2003-2014 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] 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
28 Sep 2015, 4:28 AM
#12
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Cannot delete users from within admin

_Vince:

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)?

_Vince:

... #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&"

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&"


Example 3: "page=1&action=deleteconfirm&",

stdClass Object
(
[cID] => 2
)

_Vince:

... 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?

_Vince:

... *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?

lhungil:

... 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

28 Sep 2015, 4:41 AM
#13
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

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

28 Sep 2015, 6:27 AM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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...

28 Sep 2015, 7:15 AM
#15
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

Re: Cannot delete users from within admin

lhungil:

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.

lhungil:

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.

lhungil:

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.

lhungil:

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.

lhungil:

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

777, as expected.

lhungil:

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.

lhungil:

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.

lhungil:

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?

lhungil:

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.

lhungil:

So there are zero changes, modifications, or overrides present?

As far as I can know, no.

lhungil:

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.

28 Sep 2015, 8:42 PM
#16
vince_1 avatar

vince_1

New Zenner

Join Date:
Sep 2015
Location:
Upper Hutt
Posts:
13
Plugin Contributions:
0

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.

29 Sep 2015, 7:56 PM
#17
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Cannot delete users from within admin

_Vince:

... 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).

_Vince:

... 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).

_Vince:

... 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.

_Vince:

... I think I will reinstall everything and see what happens. It couldn't be any worse than it is right now.
_Vince:

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