Forums | Mahara Community

Support /
MySQL Error 1064 problem when install...


anonymous profile picture
Account deleted
Posts: 3

05 January 2009, 22:38

I'm very interested in using Mahara but still a newbie at MySQL. I'm running a WAMP on my XP laptop to develop/test. When installing the core, I get the following error:

mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group' at line 1] in adodb_throw(SHOW INDEX FROM group, )

Call stack (most recent first): 
  • adodb_throw("mysql", "adodb_throw", 1064, "You have an error in your SQL syntax; check the ma...", "SHOW INDEX FROM group", false, object(ADODB_mysql)) at C:\wamp\www\mahara\htdocs\lib\adodb\adodb.inc.php:221
  • ADODB_TransMonitor("mysql", "EXECUTE", 1064, "You have an error in your SQL syntax; check the ma...", "SHOW INDEX FROM group", false, object(ADODB_mysql)) at C:\wamp\www\mahara\htdocs\lib\adodb\adodb.inc.php:907
  • ADOConnection->_Execute("SHOW INDEX FROM group", false) at C:\wamp\www\mahara\htdocs\lib\adodb\adodb.inc.php:882
  • ADOConnection->Execute("SHOW INDEX FROM group") at C:\wamp\www\mahara\htdocs\lib\adodb\drivers\adodb-mysql.inc.php:92
  • ADODB_mysql->MetaIndexes("group") at C:\wamp\www\mahara\htdocs\lib\ddl.php:478
  • find_index_name(object(XMLDBTable), object(XMLDBIndex)) at C:\wamp\www\mahara\htdocs\lib\ddl.php:377
  • index_exists(object(XMLDBTable), object(XMLDBIndex)) at C:\wamp\www\mahara\htdocs\lib\xmldb\classes\generators\XMLDBGenerator.class.php:266
  • XMLDBgenerator->getCreateTableSQL(object(XMLDBTable)) at C:\wamp\www\mahara\htdocs\lib\xmldb\classes\XMLDBTable.class.php:799
  • XMLDBTable->getCreateTableSQL("mysql", "", false) at C:\wamp\www\mahara\htdocs\lib\xmldb\classes\XMLDBStructure.class.php:726
  • XMLDBStructure->getCreateStructureSQL("mysql", "", false) at C:\wamp\www\mahara\htdocs\lib\ddl.php:566
  • install_from_xmldb_file("C:\wamp\www\mahara\htdocs/lib/db/install.xml") at C:\wamp\www\mahara\htdocs\lib\upgrade.php:257
  • upgrade_core(object(stdClass)) at C:\wamp\www\mahara\htdocs\admin\upgrade.json.php:71

 

My WAMP consists of Windows XP, MySQL 5.1.30, PHP 5.2.7, Apache 2.2.10.

 

Thanks for any help you can give.

anonymous profile picture
Account deleted
Posts: 1643

06 January 2009, 18:26

Hi Bruce - it looks like you found a bug in ADODB. I think I have a fix for it, I would be grateful if you could try it out and let me know if it helps you.

In the file lib/adodb/drivers/adodb-mysql.inc.php, line 92 is:

     $rs = $this->Execute(sprintf('SHOW INDEX FROM %s',$table));

Could you please change this line to (note the added quote marks):

     $rs = $this->Execute(sprintf('SHOW INDEX FROM "%s"',$table));

And let me know if that makes it work? Drop and re-create your database before re-attempting the installation.

anonymous profile picture
Account deleted
Posts: 3

07 January 2009, 12:16

I dropped the database and re-created it, edited the file as shown, and re-installed. This time, I'm not getting an error but it is hanging while still installing the core (a screenshot posted here: http://www.drellis.net/mahara_install_hang.png) Jumping over into phpmyadmin I can see that 57 tables have been created. After giving it about 20 minutes, it still is on the first item (core). Stopped the process, dropped/recreated the table, and tried it again to get the same issue. I'm not getting the original error (that's good) but it is now hanging.

 Any ideas?

anonymous profile picture
Account deleted
Posts: 228

07 January 2009, 13:08

Hi Bruce,

What is the last table that gets created before it hangs (you should be able to see this in phpmyadmin)

Cheers,

Penny

anonymous profile picture
Account deleted
Posts: 1643

07 January 2009, 18:11

That sounds like a PHP fatal error occurred. Do you have access to your apache error log? There should be a message in there after you try the install about what went wrong.
anonymous profile picture
Account deleted
Posts: 3

08 January 2009, 17:52

I removed mahara and re-installed it and check the error log. No errors reported though the install is still happily spinning. No errors in the php_error.log either. It now has 60 tables in the database (usr_registration was the last before re-installing mahara...now it is view_layout).

 Any ideas?

 

anonymous profile picture
Account deleted
Posts: 1643

08 January 2009, 21:03

Hm, the next table after that one is 'view', I wonder if this has caused another issue between MySQL and ADODB... but it's really hard to tell without any error messages to help with Frown.

Have you found and checked all of the error logs you can find? Does someone else on the forums with WAMP experience have an idea about this issue, or where errors might be logged to?

anonymous profile picture
Account deleted
Posts: 228

09 January 2009, 2:45

Hmmm... if the last table is different each time it could be that php is running out of resource (time or memory).

Do you have access to your php.ini?  Can you make sure log_errors is on?

anonymous profile picture
Account deleted
Posts: 8

01 February 2009, 13:34

 Hi

I think I am getting the same error - it hangs when installing the core component. 

 :( Could not execute command: CREATE TABLE mhr_config ( field VARCHAR(255) NOT NULL, value TEXT, CONSTRAINT PRIMARY KEY (field) )TYPE=innodb 

Call stack (most recent first):
execute_sql("CREATE TABLE mhr_config (
    field VARCHAR(255) N...", true
) at C:\wamp\www\mahara\htdocs\lib\dml.php:1339

  • execute_sql_arr(array(size 129)) at C:\wamp\www\mahara\htdocs\lib\ddl.php:570
  • install_from_xmldb_file("C:\wamp\www\mahara\htdocs/lib/db/install.xml") at C:\wamp\www\mahara\htdocs\lib\upgrade.php:257
  • upgrade_core(object(stdClass)) at C:\wamp\www\mahara\htdocs\admin\upgrade.json.php:71

I get 35 tables installed but I have had as many as 50. There are no error messages in apache, but I get the following php error message

[01-Feb-2009 16:37:36] [WAR] d8 (C:\wamp\www\mahara\htdocs\lib\mahara.php:572) Invalid argument supplied for foreach()

[01-Feb-2009 16:37:36] Call stack (most recent first):

[01-Feb-2009 16:37:36]   * log_message("Invalid argument supplied for foreach()", 8, true, true, "C:\wamp\www\mahara\htdocs\lib\mahara.php", 572) at C:\wamp\www\mahara\htdocs\lib\errors.php:374

[01-Feb-2009 16:37:36]   * error(2, "Invalid argument supplied for foreach()", "C:\wamp\www\mahara\htdocs\lib\mahara.php", 572, array(size 2)) at C:\wamp\www\mahara\htdocs\lib\mahara.php:572

[01-Feb-2009 16:37:36]   * load_config() at C:\wamp\www\mahara\htdocs\init.php:127

[01-Feb-2009 16:37:36]   * require("C:\wamp\www\mahara\htdocs\init.php") at C:\wamp\www\mahara\htdocs\index.php:30

[01-Feb-2009 16:37:36]

[01-Feb-2009 16:37:36] [WAR] d8 (Unknown:0) Unknown: open(c:/wamp/data\sessions\f\b\5\sess_fb5b55eeff44f98315ed42e8043ed56a, O_RDWR) failed: No such file or directory (2)

[01-Feb-2009 16:37:36] [WAR] d8 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:/wamp/data\sessions)

[01-Feb-2009 16:37:37] [WAR] 2e (Unknown:0) Unknown: open(c:/wamp/data\sessions\f\b\5\sess_fb5b55eeff44f98315ed42e8043ed56a, O_RDWR) failed: No such file or directory (2)

[01-Feb-2009 16:37:37] [WAR] 2e (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:/wamp/data\sessions)

[01-Feb-2009 16:37:40] [WAR] e4 (Unknown:0) Unknown: open(c:/wamp/data\sessions\f\b\5\sess_fb5b55eeff44f98315ed42e8043ed56a, O_RDWR) failed: No such file or directory (2)

[01-Feb-2009 16:37:40] [WAR] e4 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:/wamp/data\sessions)

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106) mysql error: [1050: Table 'mhr_config' already exists] in adodb_throw(CREATE TABLE mhr_config (

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106)     field VARCHAR(255) NOT NULL,

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106)     value TEXT,

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106) CONSTRAINT  PRIMARY KEY (field)

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106) )TYPE=innodb, )

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106) Command was: CREATE TABLE mhr_config (

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106)     field VARCHAR(255) NOT NULL,

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106)     value TEXT,

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106) CONSTRAINT  PRIMARY KEY (field)

[01-Feb-2009 16:37:41] [DBG] c8 (C:\wamp\www\mahara\htdocs\lib\dml.php:106) )TYPE=innodb

[01-Feb-2009 16:37:41] [WAR] c8 (C:\wamp\www\mahara\htdocs\lib\errors.php:654) Could not execute command: CREATE TABLE mhr_config (

[01-Feb-2009 16:37:41] [WAR] c8 (C:\wamp\www\mahara\htdocs\lib\errors.php:654)     field VARCHAR(255) NOT NULL,

[01-Feb-2009 16:37:41] [WAR] c8 (C:\wamp\www\mahara\htdocs\lib\errors.php:654)     value TEXT,

[01-Feb-2009 16:37:41] [WAR] c8 (C:\wamp\www\mahara\htdocs\lib\errors.php:654) CONSTRAINT  PRIMARY KEY (field)

[01-Feb-2009 16:37:41] [WAR] c8 (C:\wamp\www\mahara\htdocs\lib\errors.php:654) )TYPE=innodb

[01-Feb-2009 16:37:41] Call stack (most recent first):

[01-Feb-2009 16:37:41]   * log_message("Could not execute command: CREATE TABLE mhr_config...", 8, true, true) at C:\wamp\www\mahara\htdocs\lib\errors.php:90

[01-Feb-2009 16:37:41]   * log_warn("Could not execute command: CREATE TABLE mhr_config...") at C:\wamp\www\mahara\htdocs\lib\errors.php:654

[01-Feb-2009 16:37:41]   * SQLException->__construct("Could not execute command: CREATE TABLE mhr_config...") at C:\wamp\www\mahara\htdocs\lib\dml.php:108

[01-Feb-2009 16:37:41]   * execute_sql("CREATE TABLE mhr_config (

[01-Feb-2009 16:37:41]     field VARCHAR(255) N...", true) at C:\wamp\www\mahara\htdocs\lib\dml.php:1339

[01-Feb-2009 16:37:41]   * execute_sql_arr(array(size 129)) at C:\wamp\www\mahara\htdocs\lib\ddl.php:570

[01-Feb-2009 16:37:41]   * install_from_xmldb_file("C:\wamp\www\mahara\htdocs/lib/db/install.xml") at C:\wamp\www\mahara\htdocs\lib\upgrade.php:257

[01-Feb-2009 16:37:41]   * upgrade_core(object(stdClass)) at C:\wamp\www\mahara\htdocs\admin\upgrade.json.php:71

[01-Feb-2009 16:37:41]

[01-Feb-2009 16:37:41] [WAR] c8 (Unknown:0) Unknown: open(c:/wamp/data\sessions\f\b\5\sess_fb5b55eeff44f98315ed42e8043ed56a, O_RDWR) failed: No such file or directory (2)

[01-Feb-2009 16:37:41] [WAR] c8 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:/wamp/data\sessions)

I am also trying to get it to work on WAMP.

Can anyone offer any further help?

Thank you

anonymous profile picture
Account deleted
Posts: 8

02 February 2009, 12:38

I have made some progress. By adding the session.save_path (3;c:\wamp\data\sessions) to php.ini I have reduced the errors to the following the first time I try to launch Mahara 

[02-Feb-2009 16:26:31] [WAR] 26 (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:26:31] [WAR] 26 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

[02-Feb-2009 16:26:32] [WAR] 8e (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:26:32] [WAR] 8e (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

[02-Feb-2009 16:26:35] [WAR] fe (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:26:35] [WAR] fe (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

If I stop the installation and try to run it again I get more errors, some of which are because tables have already been created.

[02-Feb-2009 16:33:32] [WAR] 75 (C:\wamp\www\mahara\lib\mahara.php:572) Invalid argument supplied for foreach()

[02-Feb-2009 16:33:32] Call stack (most recent first):

[02-Feb-2009 16:33:32]   * log_message("Invalid argument supplied for foreach()", 8, true, true, "C:\wamp\www\mahara\lib\mahara.php", 572) at C:\wamp\www\mahara\lib\errors.php:374

[02-Feb-2009 16:33:32]   * error(2, "Invalid argument supplied for foreach()", "C:\wamp\www\mahara\lib\mahara.php", 572, array(size 2)) at C:\wamp\www\mahara\lib\mahara.php:572

[02-Feb-2009 16:33:32]   * load_config() at C:\wamp\www\mahara\init.php:127

[02-Feb-2009 16:33:32]   * require("C:\wamp\www\mahara\init.php") at C:\wamp\www\mahara\index.php:30

[02-Feb-2009 16:33:32]

[02-Feb-2009 16:33:32] [WAR] 75 (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:33:32] [WAR] 75 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

[02-Feb-2009 16:33:33] [WAR] 45 (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:33:33] [WAR] 45 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

[02-Feb-2009 16:33:36] [WAR] 8d (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:33:36] [WAR] 8d (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106) mysql error: [1050: Table 'mhr_config' already exists] in adodb_throw(CREATE TABLE mhr_config (

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106)     field VARCHAR(255) NOT NULL,

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106)     value TEXT,

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106) CONSTRAINT  PRIMARY KEY (field)

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106) )TYPE=innodb, )

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106) Command was: CREATE TABLE mhr_config (

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106)     field VARCHAR(255) NOT NULL,

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106)     value TEXT,

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106) CONSTRAINT  PRIMARY KEY (field)

[02-Feb-2009 16:33:37] [DBG] 34 (C:\wamp\www\mahara\lib\dml.php:106) )TYPE=innodb

[02-Feb-2009 16:33:37] [WAR] 34 (C:\wamp\www\mahara\lib\errors.php:654) Could not execute command: CREATE TABLE mhr_config (

[02-Feb-2009 16:33:37] [WAR] 34 (C:\wamp\www\mahara\lib\errors.php:654)     field VARCHAR(255) NOT NULL,

[02-Feb-2009 16:33:37] [WAR] 34 (C:\wamp\www\mahara\lib\errors.php:654)     value TEXT,

[02-Feb-2009 16:33:37] [WAR] 34 (C:\wamp\www\mahara\lib\errors.php:654) CONSTRAINT  PRIMARY KEY (field)

[02-Feb-2009 16:33:37] [WAR] 34 (C:\wamp\www\mahara\lib\errors.php:654) )TYPE=innodb

[02-Feb-2009 16:33:37] Call stack (most recent first):

[02-Feb-2009 16:33:37]   * log_message("Could not execute command: CREATE TABLE mhr_config...", 8, true, true) at C:\wamp\www\mahara\lib\errors.php:90

[02-Feb-2009 16:33:37]   * log_warn("Could not execute command: CREATE TABLE mhr_config...") at C:\wamp\www\mahara\lib\errors.php:654

[02-Feb-2009 16:33:37]   * SQLException->__construct("Could not execute command: CREATE TABLE mhr_config...") at C:\wamp\www\mahara\lib\dml.php:108

[02-Feb-2009 16:33:37]   * execute_sql("CREATE TABLE mhr_config (

[02-Feb-2009 16:33:37]     field VARCHAR(255) N...", true) at C:\wamp\www\mahara\lib\dml.php:1339

[02-Feb-2009 16:33:37]   * execute_sql_arr(array(size 103)) at C:\wamp\www\mahara\lib\ddl.php:570

[02-Feb-2009 16:33:37]   * install_from_xmldb_file("C:\wamp\www\mahara/lib/db/install.xml") at C:\wamp\www\mahara\lib\upgrade.php:257

[02-Feb-2009 16:33:37]   * upgrade_core(object(stdClass)) at C:\wamp\www\mahara\admin\upgrade.json.php:71

[02-Feb-2009 16:33:37]

[02-Feb-2009 16:33:37] [WAR] 34 (Unknown:0) Unknown: open(c:\wamp\data\sessions\f\9\4\sess_f946de57f703eff680c177b8d08548b6, O_RDWR) failed: No such file or directory (2)

[02-Feb-2009 16:33:37] [WAR] 34 (Unknown:0) Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (3;c:\wamp\data\sessions)

I have only a limited knowledge of PHP and therefore am a bit in the dark. I notice that the number of tables created varies. Last time I had 53, but I have had as low as 35

Is this of any help?

Jonathan

22 results