This was my first experience with zencart and it was not a good one. However i do understand being a developer myself that sometimes things just go wrong even with the best intentions. However in all my years i have never run into a software that has two config files, one for admin and one for the user side, seems a bit of overkill and i dont see the need.
Anyway back to the topic on hand.
So here is what happened and here was my fix as well.
I installed the script and as soon as i got finished with the admin config page i got a blank page that all it said was that an error had occured. So i looked at the log per instructions and found that the admin table had not been created in the db. Probably becuase it failed im guessing at that point. So i looked at the db and all seemed find except that the admin table was not there.
So went to the install dir on my pic for the script and went to the sql section and on the very botton of the list there is a file called mysql_zencart. I copied the sql for the admin table (which i have included below for reference) and manually ran the sql via phpMyAdmin to create the table.
Then i manually put in what info i could and let the system do the rest. BE SURE YOU PUT 1 UNDER THE ADMIN PROFILE FIELD OR YOU WILL NOT HAVE ACCESS TO SUPERADMIN.
Then i used forgot password to fill in the pw fields and i was off and running when i got signed on.
HERE ARE THE ISSUES I FOUND WITH THE TABLE...
The default values on the original are not being accepted by the system. So in order for me to load the table i had to remove all the default values for the dates and a few other items and make them just NOT NULL rather than NOT NULL default = '' or when you used the time and date format i had to remove that as well and just make them all NOT NULL with no default value. So why some of the default values worked some did not and that is why the admin table failed to install. It did give me a small warning about the values when i loaded the table but once i got it loaded and the system took over i think it will be fine now.
So with that said i think you need to rethink and redo the admin table structure for the install sql. You dont have to have a default value and if you have to then do it correctly please.
MY EDITED VERSION OF THE SQL
ORIGINAL FROM THE INSTALL SQL FILECode:CREATE TABLE IF NOT EXISTS `admin` ( `admin_id` int(11) NOT NULL AUTO_INCREMENT, `admin_name` varchar(32) NOT NULL DEFAULT '', `admin_email` varchar(96) NOT NULL DEFAULT '', `admin_profile` int(11) NOT NULL DEFAULT '0', `admin_pass` varchar(255) NOT NULL DEFAULT '', `prev_pass1` varchar(255) NOT NULL DEFAULT '', `prev_pass2` varchar(255) NOT NULL DEFAULT '', `prev_pass3` varchar(255) NOT NULL DEFAULT '', `pwd_last_change_date` datetime DEFAULT NULL, `reset_token` varchar(255) NOT NULL DEFAULT '', `last_modified` datetime NOT NULL, `last_login_date` datetime NOT NULL, `last_login_ip` varchar(45) NOT NULL, `failed_logins` smallint(4) unsigned NOT NULL DEFAULT '0', `lockout_expires` int(11) NOT NULL DEFAULT '0', `last_failed_attempt` datetime NOT NULL, `last_failed_ip` varchar(45) NOT NULL, PRIMARY KEY (`admin_id`), KEY `idx_admin_name_zen` (`admin_name`), KEY `idx_admin_email_zen` (`admin_email`), KEY `idx_admin_profile_zen` (`admin_profile`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
Code: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_profile int(11) NOT NULL default '0', admin_pass varchar(255) NOT NULL default '', prev_pass1 varchar(255) NOT NULL default '', prev_pass2 varchar(255) NOT NULL default '', prev_pass3 varchar(255) NOT NULL default '', pwd_last_change_date datetime NOT NULL default '0000-00-00 00:00:00', reset_token varchar(255) NOT NULL default '', last_modified datetime NOT NULL default '0000-00-00 00:00:00', last_login_date datetime NOT NULL default '0000-00-00 00:00:00', last_login_ip varchar(45) NOT NULL default '', failed_logins smallint(4) unsigned NOT NULL default '0', lockout_expires int(11) NOT NULL default '0', last_failed_attempt datetime NOT NULL default '0000-00-00 00:00:00', last_failed_ip varchar(45) NOT NULL default '', PRIMARY KEY (admin_id), KEY idx_admin_name_zen (admin_name), KEY idx_admin_email_zen (admin_email), KEY idx_admin_profile_zen (admin_profile) ) ENGINE=MyISAM;
so with that information i ask you to do one thing for me. Please provide me or all of us a correct admin sql so that we get that loaded with the accurate defaults. Or advise us as to where to find a full sql (other than this install file) so that we can reload the whole db structure to be sure that all tables are loaded and all structure is correct.. I dont think that is too much to ask.. do you...
I hope this solution helps someone with the same issue.
Thanks for your time. :)
Bookmarks