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 ?