Forums / Upgrading to 1.5.x / Error during Database setup on windows virtual machine

Error during Database setup on windows virtual machine

Locked

Started by eastboy on 4 Jan 2012, 7:06 PM · Views: 28,115

Results 21 to 36 of 36
This thread is locked. New replies are disabled.
6 Jan 2012, 4:19 PM
#21
dancingchimes avatar

dancingchimes

New Zenner

Join Date:
Jan 2012
Posts:
4
Plugin Contributions:
0

Error during Database setup on windows virtual machine

This site was down for a bit, now it's back. I think this is the last one I'll post on the installation problem. I went ahead and changed the name of the admin folder and used it to get into the admin section. I didn't have to change anything in the configure.php.

6 Jan 2012, 4:55 PM
#22
eastboy avatar

eastboy

New Zenner

Join Date:
Dec 2011
Posts:
27
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

thanks for the extra info dancingchimes I will try the same on my side

6 Jan 2012, 6:54 PM
#23
eastboy avatar

eastboy

New Zenner

Join Date:
Dec 2011
Posts:
27
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

I managed to install and can access the new store, however when I try go to the renamed admin folder I get

an Error occured please refresh and try again.

6 Jan 2012, 7:19 PM
#24
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Error during Database setup on windows virtual machine

dancingchimes:

BTW, your documentation on how to change the admin folder needs to be updated also. The line no longer shows the simple directory/folder name, instead it's a parse statement:

define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');

Please advise how to achieve this part of the installation.

eastboy:

and to follow further in dancingchimes footsteps. I am not sure how to edit the configure.php file after renaming my admin folder

Thanks
Eastboy
Both of you didn't read the instructions, and just skipped right over the bold text saying that you don't need to do the configure.php edits in v1.5.0
But, to indulge, the document has been updated with a new dedicated section specific to 1.5.0 so that people will hopefully actually read the full details.

.
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.

6 Jan 2012, 7:45 PM
#25
eastboy avatar

eastboy

New Zenner

Join Date:
Dec 2011
Posts:
27
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

apologies, in all the excitment forgot to RTFM ;)
will continue the installing.

Guess we can close this thread

Thanks Again

29 Feb 2012, 3:59 AM
#26
enoustens avatar

enoustens

New Zenner

Join Date:
Feb 2012
Posts:
1
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

I too am experiencing the same problem. My configuration is Windows 2008 R2, with IIS7.5 and MySQL 5.4. The log file reads as follows:

[28-Feb-2012 19:57:10 UTC] PHP Fatal error: 1101:BLOB/TEXT column 'page_parameters' can't have a default value :: CREATE TABLE JAadmin_activity_log ( log_id bigint(15) NOT NULL auto_increment, access_date datetime NOT NULL default '0001-01-01 00:00:00', admin_id int(11) NOT NULL default '0', page_accessed varchar(80) NOT NULL default '', page_parameters text default '', ip_address varchar(20) NOT NULL default '', flagged tinyint NOT NULL default '0', attention varchar(255) NOT NULL default '', gzpost mediumblob NOT NULL default '', PRIMARY KEY (log_id), KEY idx_page_accessed_zen (page_accessed), KEY idx_access_date_zen (access_date), KEY idx_flagged_zen (flagged), KEY idx_ip_zen (ip_address) ) ENGINE=MyISAM COLLATE utf8_general_ci; in E:\WebApps\Store\includes\classes\db\mysql\query_factory.php on line 101

If anyone has seen this, please let me know.

29 Feb 2012, 4:03 AM
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Error during Database setup on windows virtual machine

Same answer as I posted in post #17 above.

.
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.

1 Jun 2012, 3:18 PM
#28
earthenware avatar

earthenware

New Zenner

Join Date:
Dec 2011
Posts:
44
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

I also had this problem today. I had to change the sql lines both the page_parameters and gzpost values before the installation would proceed (exactly as described in previous posts).

I had previously been running 1.3.9 and not seen this before. I deleted 1.3.9 before installing 1.5, which when the problem occurred (during installation).

Apart from the version of Zen Cart, the only difference I can think of between not seeing the problem and seeing it is that I am now running IP-based virtual hosts.

2 Jun 2012, 10:47 AM
#29
earthenware avatar

earthenware

New Zenner

Join Date:
Dec 2011
Posts:
44
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

dancingchimes:

Ok. One more thing. After the installation, I can go into the store ok but not the admin part. It complained that gzpost doesn't have a default value. I went into the database, in the 'admin-activity-log' table. Found gzpost and changed its value to 'null'. Not the default null but checking the null (from phpMyAdmin). Not familiar enough with mysql to tell what the difference is. But it worked for me. I can get into the admin section now.
I'm having the same problem but I can't fix it by declaring a default value for gzpost as MySQL won't allow it (and the documentation does say that default values are not allowed for mediumblobs).

My error message is "PHP Fatal error: 1364:Field 'gzpost' doesn't have a default value :: insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '0', 'Log found to be empty. Logging started.', '', '192.168.0.11') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\1\includes\classes\db\mysql\query_factory.php on line 101 "

Unfortunately, line 101 in query_factory.php just appears to be an error handler.

It looks like the next stage would be to find all PHP code that updates the admin_activity_log table and amend it to put something into the gzpost field but that will take ages.

Has anyone found an easier way around this?

2 Jun 2012, 11:07 AM
#30
earthenware avatar

earthenware

New Zenner

Join Date:
Dec 2011
Posts:
44
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

I've done bit more investigation into why this may be happening.

Zen Cart 1.3.9h
zc_install/sql/mysql_zencart.sql:
CREATE TABLE admin_activity_log (
log_id int(15) NOT NULL auto_increment,
access_date datetime NOT NULL default '0001-01-01 00:00:00',
admin_id int(11) NOT NULL default '0',
page_accessed varchar(80) NOT NULL default '',
page_parameters text,
ip_address varchar(15) NOT NULL default '',
PRIMARY KEY (log_id),
KEY idx_page_accessed_zen (page_accessed),
KEY idx_access_date_zen (access_date),
KEY idx_ip_zen (ip_address)
)

Zen Cart v1.5.0
zc_install/sql/mysql_zencart.sql:
CREATE TABLE admin_activity_log (
log_id bigint(15) NOT NULL auto_increment,
access_date datetime NOT NULL default '0001-01-01 00:00:00',
admin_id int(11) NOT NULL default '0',
page_accessed varchar(80) NOT NULL default '',
page_parameters text default '',
ip_address varchar(20) NOT NULL default '',
flagged tinyint NOT NULL default '0',
attention varchar(255) NOT NULL default '',
gzpost mediumblob NOT NULL default '',
PRIMARY KEY (log_id),
KEY idx_page_accessed_zen (page_accessed),
KEY idx_access_date_zen (access_date),
KEY idx_flagged_zen (flagged),
KEY idx_ip_zen (ip_address)
)

That doesn't help to fix it of course, but it does explain why I didn't have this problem with 1.3.9.

2 Jun 2012, 4:31 PM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Error during Database setup on windows virtual machine

You will need to adjust the SQL for the table structure to suit the requirements of your server. The Windows implementation of MySQL seems to enforce restrictions that don't manifest problems on other operating systems.

.
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.

25 Jun 2012, 4:39 AM
#32
cmcm avatar

cmcm

New Zenner

Join Date:
Jun 2012
Posts:
4
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

You are probably on to other things by now, but just in case. I had same problem and found that MySQL was creating the empty database for ZenCart using InnoDB as the engine instead of MyISAM. Even though the install scripts have MyISAM as the engine it still causes the the install to fail. I had to use MySQL's Workbench to login to the server administration. Select Configuration, Options, and the General tab. Find 'default-storage-engine' and check the check box and set it to MyISAM. The database for ZenCart can then be created (new) using phpMyAdmin and the default engine will be MyISAM. The zc_install should work okay after these changes.

25 Jun 2012, 4:52 AM
#33
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Error during Database setup on windows virtual machine

Thanks, but the error discussed in this thread was not related to InnoDB.

.
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.

26 Jun 2012, 3:15 PM
#34
cmcm avatar

cmcm

New Zenner

Join Date:
Jun 2012
Posts:
4
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

Honorable Sensei,
The point was that the database was expecting something other than MyISAM and even though the install script has MyISAM included in the script the install bombs out with all of the errors noted in the other posts. Changing the default database engine and then creating new the db to be used for ZenCart resolves all of the issues.

12 Feb 2013, 6:24 PM
#35
danielosko avatar

danielosko

Zen Follower

Join Date:
Dec 2008
Location:
Hanover Township PA, USA
Posts:
122
Plugin Contributions:
0

Re: Error during Database setup on windows virtual machine

Hello EastBoy!

Your changes in the sql file worked for me as well. I am using a fresh install of ZenCart 1.50 on a localhost installation using Apache 2.2/PhP 5.4.11/MySQL 5.6.10.0 and phpMyAdmin 3.5.6

Thanks Again!!!!
Dan Osko

Daniel Osko

12 Feb 2013, 6:36 PM
#36
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Error during Database setup on windows virtual machine

I would add that those changes are no longer needed in the latest version of Zen Cart.

.
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.