Zen Cart Logo
Forums / General Questions / Can't login to admin

Can't login to admin

Locked

Views: 50,599

Results 121 to 140 of 165
This thread is locked. New replies are disabled.
19 Mar 2009, 8:11 PM
#121
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Can't login to admin

Keep in mind when checking a directory via FTP that you need to refresh each time ...

I hit the bad page in my browser ...

Then I go to FTP program and refresh my directory to see what errors are generated ...

That Execute error will probably be fixed up with the sessions.php function change ...

The line numbering could be a tad off ... I keep thinking about going in and getting more specific some time so that there isn't an error on there in the numbering but so many threads read that way ... and I kinda sorta keep running out of time and forget to go customize the code and commit it after testing etc. ... so much to do and so little time ... :lamo:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Mar 2009, 8:16 PM
#122
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can't login to admin

Note: if you still have problems with it ... try using:

function _sess_write($key, $val) {
global $db;
global $SESS_LIFE;
if (!is_object($db)) {
//PHP 5.2.0 bug workaround ...
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
}

It just moves the other global variable to the top of the function ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

20 Mar 2009, 5:00 AM
#123
twinge avatar

twinge

New Zenner

Join Date:
Jun 2005
Posts:
36
Plugin Contributions:
0

Re: Can't login to admin

Sigh.

Okay, so those threads dealt with MySQL 5 issues, but usually a different issue that I'm having. The only thing I've noticed so far is the session-related oddities -- not being able to login to admin, existing user accounts, creating new accounts, and adding stuff to carts. Do you think that following some of the advice to hack my old version into compliance will still work? E.g.

Search every file sql statements of the form

"From x , y" and surround x,y with parens.

old
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
new
from (" . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd )

Or, do you think this is a different issue? As I said above, I know upgrading is the recommended option here, but that basically means starting over from scratch, and I'd really rather wait for 2.0 before I do that.

Also - no more log files generated since I added the fix to the admin sessions.php file, even though the only one that logged an error was the non-admin one. And yes, I did know to refresh the folder on the FTP - I'm not sure why it'd take time to show up like that, but nothing has appeared in the last 11 hours or so...

20 Mar 2009, 2:26 PM
#124
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can't login to admin

Without going through your site it is hard to say what else has to be addressed to get an old version working with php 5 or MySQL 5 ...

Those threads have most all of the fixes that I can think of and they do lead to other threads worth reading through to see what else is wrong ...

You might turn off the secure and test some things to see if anything else shows up that you were not seeing with the secure on ...

Switching to Classic Template to test helps eliminate issues that are template related that still need to be fixed ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

21 Mar 2009, 7:35 AM
#125
twinge avatar

twinge

New Zenner

Join Date:
Jun 2005
Posts:
36
Plugin Contributions:
0

Re: Can't login to admin

Hmm. So I'm starting to think this is more of a session issue rather than an old cart/MySQL issue. It seems like the MySQL 5 problems appear in different ways than what I'm getting, and the fixes (such as putting parentheses around sql queries with commas in them) don't seem to change anything. Unfortunately, the only real fix for session problems like the one I'm having is the change to the sessions.php files which isn't working. (And I tried moving the global variable up as you suggested as well - no dice.)

To reiterate, trying to login to the admin section acts like a page refresh. Trying to create a new account clears all fields and gives an error message. Adding an item to the cart goes to the cart page but shows it as empty with no items added. The secure/SSL settings in the configure.php file are already off.

I tried changing sessions to file based (changing " 'db' " to " '' "), but that's broken; it's trying to find files in /tempsess/zencart/cache/ and I couldn't find anywhere to change this :/

Debug is not throwing any errors when I try to log into admin, add to cart, etc. It IS working, as it will throw errors when I screw up another file (e.g. when I forgot to escape a ' when adding a message to the front page).

I made a little page to show the PHP Info in case it's relevant (especially the session section, assumedly) --http://www.justbetees.com/phpinfo.php.

I saw a few posts suggesting that this was a host issue and the host needs to change or revert some setting; might this be the case? Any other ideas to try?

(Also, should I perhaps spin this off into a new thread, or just continue posting to this old one?)

12 Mar 2010, 6:00 PM
#126
pouletfou avatar

pouletfou

New Zenner

Join Date:
Mar 2010
Posts:
1
Plugin Contributions:
0

Re: Can't login to admin

Hello

I have moved an existing zencart installation from a server to another. Since that time, I am unable to login to the admin section, except for three times that worked but since I logged off, I was never able to get back.

I searched the FAQS, wiki and forum, cleared all my cookies, restarted my browser, tried another browser, tried debugging the login script. The problem seems to be with session handling. When I enter a bad username/password I get a normal error message but when I enter a valid username/password, I just get sent back to the login page.
I changed the SESSION_WRITE_DIRECTORY to match the new server directory, I have set the correct permissions on that folder, I changed the include/configure.php and admin/include/configure.php

The zencart version is 1.3.8.

Here is my admin/include/configure.php

<?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://myhost.com');
  define('HTTPS_SERVER', 'https://myhost.com');
  define('HTTP_CATALOG_SERVER', 'http://myhost.com');
  define('HTTPS_CATALOG_SERVER', 'https://myhost.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', '/mystore/myadminfolder/');
  define('DIR_WS_CATALOG', '/mystore/');
  define('DIR_WS_HTTPS_ADMIN', '/mystore/myadminfolder/');
  define('DIR_WS_HTTPS_CATALOG', '/mystore/');

  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/myuser/myhost.com/mystore/myadminfolder/');
  define('DIR_FS_CATALOG', '/home/myuser/myhost.com/mystore/');

  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', 'myprefix_');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'mydbuser');
  define('DB_SERVER_PASSWORD', 'mydbpass');
  define('DB_DATABASE', 'mydb');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'db');
  // 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/myuser/myhost.com/mystore/cache');
// EOF
31 Mar 2010, 3:56 AM
#127
yenmax avatar

yenmax

New Zenner

Join Date:
Sep 2006
Posts:
89
Plugin Contributions:
0

Re: Can't login to admin

yenmax:

Hi,
I have bee reading the threads but I can not found my problems. I know my server was doing maintenance but after that I can not open my http://www.yenmax.com and my checkout page is not working either. So please help me, this is extremely frustrating! Thank you so much!

thanks i fixed it

31 Mar 2010, 9:32 PM
#128
redheads avatar

redheads

Zen Follower

Join Date:
May 2006
Posts:
119
Plugin Contributions:
0

Re: Can't login to admin

yenmax:

thanks i fixed it

So are you going to tell us how?
It would help build the knowledgebase :-)

31 Mar 2010, 10:06 PM
#129
redheads avatar

redheads

Zen Follower

Join Date:
May 2006
Posts:
119
Plugin Contributions:
0

Re: Can't login to admin

I am reposting this here since it took me a while to go through this thread and uncover the 'fix' for me. I have been installing zen-carts for years and had no idea what to do when I had this issue... a fresh install, and when I would go to the admin page and try to login it would simply 'refresh' the page. If I used the wrong pass it would tell me it was wrong, but I could go no further. :frusty:

I tried changing the sql settings, I tried moving the admin, rechecking the configuration files, etc... all looked fine, but I changed them and then changed them back - LOL. :wacko:

I used another browser and it worked fine. I believe the problem was in the fact that I had been logging into other zen-installations for a few days (read 4 days) and
...had not restarted the browser in those same few days. :oops:

So for me it was a browser cache issue. Much more simple than the rest of that stuff... LOL :bigups:

11 Apr 2010, 7:13 PM
#130
bikebits4you avatar

bikebits4you

New Zenner

Join Date:
Dec 2009
Posts:
5
Plugin Contributions:
0

Re: Can't login to admin

I have tried to login to my admin panel and it says incorrect username or password. I have tried to resend password and it says incorrect email address. I am worried my site has been hacked, can anyone tell me how I can login. Is there a factory login pre set into software for admin access to /admin

11 Apr 2010, 7:55 PM
#131
diytools avatar

diytools

Zen Follower

Join Date:
Oct 2008
Location:
Canada
Posts:
120
Plugin Contributions:
0

Re: Can't login to admin

Same problem I have today. Who know it how dealing it please tell us.

15 Apr 2010, 11:48 PM
#133
caroldaley avatar

caroldaley

New Zenner

Join Date:
Apr 2010
Posts:
2
Plugin Contributions:
0

Re: Can't login to admin

I was having the same problem. I tried to login in, but nothing would happen. Resending my password would not work either.

I found the culprit in my .htaccess file. The rewrite for sending example.com to https://www.example.com caused the issue. I don't know why, but when I removed it I was able to log in fine.

Now I need to figure a way for it to work with the rewrite.

17 Apr 2010, 7:59 PM
#135
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Re: Can't login to admin

all of a sudden I am not able to log into admin. Attempting setting new password for the error said I was using the wrong username or password. New password(s) didnt work either and after 10 or more attempts now log in page is gone with this error message:
0 DB_ERROR_NOT_CONNECTED
in:
[select * from zen_project_version WHERE project_version_key = 'Zen-Cart Database' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

then the back button just reloads the error page
HELP!!!!!!!!!!!!!!:censored:

blessed be the day we make tomorrow a better yesterday

17 Apr 2010, 8:51 PM
#136
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can't login to admin

If you can see your Catalog ... check the two configure.php files:
/includes/configure.php
/admin/includes/configure.php

and make sure that the database information is the same as it sounds like you are not connecting the the right database or have the wrong username or password ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 Apr 2010, 9:53 PM
#137
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Re: Can't login to admin

Ajeh:

If you can see your Catalog ... check the two configure.php files:
/includes/configure.php
/admin/includes/configure.php

both files checked and all is exactly the same under
define('DB_TYPE', 'mysql');

restoring from my backup files failed now I get
the nddbc.html file :lamo:

blessed be the day we make tomorrow a better yesterday

18 Apr 2010, 12:15 AM
#138
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can't login to admin

First ... before changing anything could you see your Catalog even though you could not login to your admin?

Next ... when you say "restoring from my backup files" are you referring to your configure.php files or other files or your database?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Apr 2010, 2:41 PM
#139
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Re: Can't login to admin

Lackew:

error message:
0 DB_ERROR_NOT_CONNECTED
in:
[select * from zen_project_version WHERE project_version_key = 'Zen-Cart Database' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

then the back button just reloads the error page
HELP!!!!!!!!!!!!!!:censored:

checking my database I got this error:
SQL result
Host: XXXXX.db.XXXXXX1.XXXXX.com
Database: XXXXXXXXx
Generation Time: Apr 18, 2010 at 08:28 AM
Generated by: phpMyAdmin 2.11.9.4 / MySQL 5.0.67.d7-ourdelta-log
SQL query: EXPLAIN SELECT * FROM zen_db_cache;
Rows: 1
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE zen_db_cache system NULL NULL NULL NULL 0 const row not found
:frusty:
but clueless on how to fix

blessed be the day we make tomorrow a better yesterday

18 Apr 2010, 4:11 PM
#140
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Re: Can't login to admin

since site has been down for a day or so I am reinstalling. Which of my backup files do I need to upload to make the site as it originally saved?????
do I replace everything except the 2 configure.php files & just edit for database?

blessed be the day we make tomorrow a better yesterday