Re: unable to login to admin
Without a link to your site, we can only guess.
You might try entering your admin link in the W3C validator to see if there are any errors that would affect IE.
You can also view the page source in IE to try and determine where the admin index stops loading.
Re: unable to login to admin
Thanks for that I will keep this in mind for some reason now it is working in both.
IE must have been having a bad hair day or something like that.
Re: unable to login to admin
I just created a fresh install of 1.3.8a and have been having similar login problems in the admin area - I use the correct password and username and the page simply refreshes.
I was able to resolve using the recommended 'admin/includes/local/configure.php' recommendation earlier in this thread (define('SESSION_RECREATE', 'False');).
My client is looking to switch from a previous oscommerce install so I am trying zen and I would like to know if there is a specific production-ready fix I can make for this problem.
Am I correct in assuming that I should not go live with the workaround in place? If so what is the correct methodology for fixing my issue properly?
My configuration is:
Webserver = Apache/2.0.46 (Red Hat)
PHP 4.3.2
MySQL 3.23.58 (I know - incredibly old - maybe I should switch hosters)
Thanks in advance for any assistance.
Re: unable to login to admin
Quote:
Originally Posted by
davn8r
I just created a fresh install of 1.3.8a and have been having similar login problems in the admin area - I use the correct password and username and the page simply refreshes.
I was able to resolve using the recommended 'admin/includes/local/configure.php' recommendation earlier in this thread (define('SESSION_RECREATE', 'False');).
My client is looking to switch from a previous oscommerce install so I am trying zen and I would like to know if there is a specific production-ready fix I can make for this problem.
Am I correct in assuming that I should not go live with the workaround in place? If so what is the correct methodology for fixing my issue properly?
My configuration is:
Webserver = Apache/2.0.46 (Red Hat)
PHP 4.3.2
MySQL 3.23.58 (I know - incredibly old - maybe I should switch hosters)
Thanks in advance for any assistance.
You answered your own question.
New 2.0 (when out) will require PHP 5.2 and MySql 4.+
Re: unable to login to admin
Quote:
Originally Posted by
davn8r
I was able to resolve using the recommended 'admin/includes/local/configure.php' recommendation earlier in this thread (define('SESSION_RECREATE', 'False');).
You'll recall that there is specific warning against using that in a live environment: http://www.zen-cart.com/forum/showpo...1&postcount=44
Quote:
Originally Posted by
davn8r
My client is looking to switch from a previous oscommerce install so I am trying zen and I would like to know if there is a specific production-ready fix I can make for this problem.
Am I correct in assuming that I should not go live with the workaround in place? If so what is the correct methodology for fixing my issue properly?
My configuration is:
Webserver = Apache/2.0.46 (Red Hat)
PHP 4.3.2
MySQL 3.23.58 (I know - incredibly old - maybe I should switch hosters)
There are 2 factors to a "production-ready" "fix":
1) use a current version of PHP. Yours is ancient and is no longer supported by the PHP authors. I'm not surprised that you're having session problems if the server is that outdated and clearly unmaintained.
2) use the latest published version of Zen Cart with all published patches applied to it
As dbltoe mentioned, you clearly need to upgrade your webserver if you want to avoid future headaches.
If you're considering changing hosting companies, there is a list of recommended Hosts available via a link at the top of this page.
Re: unable to login to admin
Oi, looks like I get to give this thread yet another bump up. I think I've found my answer, but this answer disturbs me greatly so I'm hoping for an alternative ;) To be specific, I'm getting the same issue with the admin login page merely going back to itself, whether a correct login is supplied or not. It also appears that I can't make a new customer account either. This is an old install that work working fine at least through most of January, and just recently stopped working. Pertinent info:
* Site: www.justbetees.com
* Host: Dreamhost
* Secure settings in configure files turned off
* PHP: 5.2.6
* MySQL: 5.0.16
* ZenCart Version: Ancient (Somewhere between 1.2.4 and 1.3.0.1, probably closer to the former -- 5/11/06 timestamp on files, so a version at that time or older)
I'm pretty sure my issue is the last two bullet points there - I read that Pre-1.3 versions do not work properly with MySQL 5. I know the obvious suggestion would be to upgrade, but I'd REALLY like to avoid this if possible; a lot of the site's design and code has been hack-jobbed through a variety of different files and I believe I'd basically be starting from scratch on an upgrade - which is time I really can't afford to spend right now. My plan was to just tough it out with my ancient version until 2.0 came along and then start fresh then :/
Anyway, if this is indeed the likely problem... any suggestions for some quick hacky fixes I might be able to implement, to keep the site live and running for another few months? (I don't think I can switch back to MySQL 4; DH had posted that all new databases were going to be 5, and all old ones would stay 4 as long as they reasonably could. This was posted sometime 8/2008.) Or, other ideas of what it might be if that's not definitely the problem?
Re: unable to login to admin
[QUOTE=Twinge;702270
* Host: Dreamhost
* Secure settings in configure files turned off
* PHP: 5.2.6
* MySQL: 5.0.16
* ZenCart Version: Ancient (Somewhere between 1.2.4 and 1.3.0.1, probably closer to the former -- 5/11/06 timestamp on files, so a version at that time or older)[/QUOTE]
Yesterday my cart was working fine. Today I can't login. The admin page does nothing, won't login, won't send a password, won't do anything. I noticed you host with Dreamhost. I also host with them and wonder if something happened last night???
Re: unable to login to admin
There are various things that going to php 5 and MySQL 5 break down on in old versions of Zen Cart ...
Some of these threads can help:
http://www.zen-cart.com/forum/showth...t=join+upgrade
http://www.zen-cart.com/forum/showthread.php?t=25174
There is also a change that helps on php 5 for the two session.php functions ...
Note the change here specific to php 5:
Code:
function _sess_write($key, $val) {
global $db;
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);
}
global $SESS_LIFE;
There are probably other threads on this ... but these should help a lot ...
Also get the Debug Tool from the Free Software Add Ons ... as it can help identify them ...
The main issue is the SELECT statements and how they are constructed that need updating ...
Note: do those session function files first or you won't get real far if already in php 5 ... :smile:
Re: unable to login to admin
Quote:
Originally Posted by
townsend2009
Yesterday my cart was working fine. Today I can't login. The admin page does nothing, won't login, won't send a password, won't do anything. I noticed you host with Dreamhost. I also host with them and wonder if something happened last night???
This has been an issue for me for at least ~3 weeks or so - it didn't just happen last night. However, if Dreamhost is gradually forcing databases to become MySQL 5 over the course of several weeks, then it might be a related issue - especially if you also have an older version of ZC.
Re: unable to login to admin
Quote:
Originally Posted by
Ajeh
There is also a change that helps on php 5 for the two session.php functions ...
(code)
Note: do those session function files first or you won't get real far if already in php 5 ... :smile:
Quite - it looks like I already made this change a year and a half ago to the main sessions.php file. I don't actually remember doing it, hehe. Dreamhost must've force-switched to PHP5 a long while back, but maybe forcing MySQL 5 is only recent? Today I put this fix in the admin sessions file too, though it would appear that it was working on PHP5 without it for quite some time.
Quote:
Originally Posted by
Ajeh
I'll start reading through then, thanks. This is kind of a hard problem to search for; I tried a couple different terms and read through a lot of threads already, hehe.
Quote:
Originally Posted by
Ajeh
Also get the Debug Tool from the Free Software Add Ons ... as it can help identify them ...
I forgot to mention that I had already done this last night as well - in both the admin and general sections. No log files were showing up (and I did make sure the cache folder was set to 777).
Checking it now, though, there are some log files present, all with the same error:
[19-Mar-2009 01:43:43] PHP Fatal error: Call to a member function Execute() on a non-object in /xxxx/xxxx/xxxx/xxxx/includes/functions/sessions.php on line 72
And this is the entire relevant function how it looks now, with line numbers (starting at 1; I notice line 72 is blank, so perhaps the line numbers should start at 0?):
Code:
**xxxx/includes/functions/sessions.php**
61 function _sess_write($key, $val) {
62
63 global $db;
64 // The following is only to work around a PHP 5.2.0 bug:
65 if (!is_object($db)) {
66 $db = new queryFactory();
67 $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
68 }
69 //PHP 5.2.0 bug workaround ...
70
71 global $SESS_LIFE;
72
73 $expiry = time() + $SESS_LIFE;
74 $value = $val;
75
76 $qid = "select count(*) as total
77 from " . TABLE_SESSIONS . "
78 where sesskey = '" . zen_db_input($key) . "'";
79
80 $total = $db->Execute($qid);
81
82 if ($total->fields['total'] > 0) {
83 $sql = "update " . TABLE_SESSIONS . "
84 set expiry = '" . zen_db_input($expiry) . "', value = '" . zen_db_input($value) . "'
85 where sesskey = '" . zen_db_input($key) . "'";
86
87 return $db->Execute($sql);
88
89 } else {
90 $sql = "insert into " . TABLE_SESSIONS . "
91 values ('" . zen_db_input($key) . "', '" . zen_db_input($expiry) . "', '" .
92 zen_db_input($value) . "')";
93
94 return $db->Execute($sql);
95
96 }
97 }
Perhaps I implemented the fix incorrectly? It's been somehow working for most of the last year and a half this way, though ;P