I am also experiencing this problem. I just installed mySQL and phpmyadmin on my local machine and every time i try to login to my admin panel it does nothing. I'm stumped.
I am also experiencing this problem. I just installed mySQL and phpmyadmin on my local machine and every time i try to login to my admin panel it does nothing. I'm stumped.
A quick question ...
Is it likely that non-recognition of the password and the failure of the 'resend email' feature are somehow related ?
Here is a solution to the same problem, as posted in another thread.
--------------------------------------------------
Seems I ran into the php 5.2 update bug.
This fixed it (from another thread):
edit /includes/functions/sessions.php
function _sess_write($key, $val) {
global $db;
change to:
function _sess_write($key, $val) {
// The following is only to work around a PHP 5.2.0 bug:
//global $db;
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
--------------------------------------------------
To clarify the PhP 5.2 bug fix (cf Website Rob post),
1 - open up the file sessions.php located in
[...] /includes/functions/
2 - in the code for the function _sess_write($key, $val)
add in the comment prefixed by two forward slashes,
and forward slash the next line also to skip running 'global $db '
3 - then add the lines & save
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
Then
4 - re-run the 'Admin/admin' SQL query to set up the temporary password permissions
5 - attempt login
The host in my case has PhP 5.1.6 but I tried it anyway ... no change: no access to Zencart adminstrator, password appears to be recognised, password resend doesn't work ('email error').
*> Something else:
Putting that on one side, to get around this admin entry barrier, why not log in to the ghost store via the front page as a customer, then pick up the assigned login details as recorded in the database tables and give the 'customer' Adminstrator status via the admin table ? 'Customer'/'Adminstrator' should then be able to login to Zencart administrator with recognised username and password, right ?
In the database, customer login usernames (which are email addresses) and passwords are stored strangely enough in the 'customers' table. BTW, when I tried to sign up as customer, the same error occured as when trying to post back the Admin login password - blank white screen with just 'email error' on it. My customer details were logged in the address book OK, and by back-paging I found I was logged in anyway. Logging out and logging in again showed that the email/username was working [clue for the Zencart team to check the Admin password re-send code against validation routine(s) ??].
Now I take the customer username/email and password and make an Administrator out of him (not too dificult but character-forming nonetheless), first by direct entries into the admin database (no success with this route), then by running the SQL query (dummy variables cited here):
DROP TABLE IF EXISTS admin;
CREATE TABLE admin (
admin_id int(11) NOT NULL auto_increment,
admin_name varchar(32) NOT NULL default '',
admin_email varchar(96) NOT NULL default '',
admin_pass varchar(40) NOT NULL default '',
admin_level tinyint(1) NOT NULL default '1',
PRIMARY KEY (admin_id),
KEY idx_admin_name_zen (admin_name),
KEY idx_admin_email_zen (admin_email)
) TYPE=MyISAM;
INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('[email protected]', 'admin@localhost', '72dab1fdcefe73f68eed5a884a289cf5:af', 1);
This doesn't work either: in both cases no access to Zencart adminstrator, username/password combo is not recognised at all, password resend doesn't work ('email error'). Caramba ...
A clue for those that know about these things might lie with the answer to why the customer email gets you in to the store but the admin email resend just generates an error ... a question for the Zencart team: where would the best place be to start looking for that sort of thing ?
Regarding the 'INSERT INTO' statement, do not make your 'admin_name' an eMail address.
INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('Buddy', 'buddy@real_domain.com', '', 1);
Using the above statement as an example, it should set the password to blank, nothing, nada. Enter Admin name and hit the 'login' button. Not the most secure but should be OK for the short time it would take to see if it works.
Last edited by Ajeh; 12 Dec 2006 at 02:50 AM. Reason: make broken domain name
If entering an admin name and password comes back to login page without giving an error about password invalid etc, then you have a problem with sessions.
So, either your PHP configuration is set to deal with sessions incorrectly, or your browser and/or firewall are blocking session cookies etc.
Often testing from another browser and even another PC and/or another house/office will show whether the problem is related to the browser/firewall. If the problem persists, then it's likely the PHP configuration on the webserver.
During installation, were there any warnings on the System Inspection page which you chose to ignore?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
dscvry ... your INSERT is in the wrong format so if you look in your admin table via phpMyAdmin you would see that the fields are not filled in correctly ...
Note: folks with php 5.2.0 should check if the issue isn't a bug in that php version:
http://www.zen-cart.com/forum/showth...Execute%2A
Check #26
Note:
/includes/functions/sessions.php
/admin/includes/functions/sessions.php
They are similar and can be adapted to get past the php 5.2.0 bug ...
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!
it isnt really a php problem they have made it more secure. Zen cart need to do the work around. They should hold how it is cached and then explicitly load the variable in accordance to how it is cached. It is alot better than keeping it loose and dangleling
Might do a search on this as an awful lot of sites have a problem with it and php has committed a fix for it ...![]()
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!