Author Topic: Problem with createSchema.sh  (Read 8384 times)

JohnHansknecht

  • Newbie
  • *
  • Posts: 11
    • http://www.uofdjesuit.org
Problem with createSchema.sh
« on: March 05, 2008, 11:30:30 am »
I am trying to install on a RHEL5 server. I have worked my way through to step 6 in the setup guide. When I get to run createSchema.sh I receive the following error messages. Any ideas on a solution?

Output of createSchema.sh
[root@server02 database]# ./createSchema.sh
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerAppender.php on line 73
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerPropertyConfigurator.php on line 565
PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'calemeam'@'localhost' (using password: YES)' in /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemPdo.php:53
Stack trace:
#0 /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemPdo.php(53): PDO->__construct('mysql:host=loca...', 'calemeam', 'password', Array)
#1 /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/mysql/MysqlHandler.php(148): CalemPdo->__construct('mysql:host=loca...', 'calemeam', 'password', Array)
#2 /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemDbo.php(79): MysqlHandler->getCalemConnection()
#3 /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemDbSetup.php(158): CalemDbo->__construct()
#4 /home/studentuofdjesuitssl/html/CalemEAM/server/setup/CalemCreateSchema.php(86): CalemDbSetup->validate()
#5 /home/studentuofdjesuitssl/html/CalemEAM/server/setup/CreateSchemaCmd.php(45): CalemCr in /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemPdo.php on line 53


From Calem log
2008-03-05 11:23:53,430 ERROR CalemDbSetup - SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet, executing sql=CREATE DATABASE IF NOT EXISTS calemeam CHARACTER SET utf8 COLLATE utf8_general_ci
2008-03-05 11:23:53,430 ERROR CalemDbSetup - SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet, executing sql=CREATE USER 'calemeam'@'localhost' IDENTIFIED BY 'password'
2008-03-05 11:23:53,430 ERROR CalemDbSetup - SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet, executing sql=GRANT SELECT, UPDATE, INSERT, DELETE, CREATE, ALTER, INDEX ON `calemeam`.* TO 'calemeam'@'localhost'
2008-03-05 11:23:53,430 INFO  MysqlHandler - calem db connection: user=calemeam, password=***, , connection=mysql:host=localhost;dbname=calemeam, persistent connection=Array
2008-03-05 11:23:53,430 ERROR SetupCalemDatabase - Error in setting up db, error=SQLSTATE[28000] [1045] Access denied for user 'calemeam'@'localhost' (using password: YES)
2008-03-05 11:23:53,430 INFO  MysqlHandler - calem db connection: user=calemeam, password=***, , connection=mysql:host=localhost;dbname=calemeam, persistent connection=Array
2008-03-05 11:38:50,996 INFO  MysqlHandler - db admin connection: user=root, password=***, , connection=mysql:host=localhost
hanks,

John

calemadmin

  • Administrator
  • Calem Hero
  • *****
  • Posts: 300
    • http://www.calemeam.com
Problem with createSchema.sh
« Reply #1 on: March 06, 2008, 07:56:46 am »
It seems to do with the client library, see http://netevil.org/blog/2006/apr/using-pdo-mysql
You could try this out on CalemEAM/server/include/core/database/CalemDbSetup.php before line 137:
$conn->query($sql);

Which versions are the PHP, MySQL, or XAMPP if applicable?
Calem Community Forum Admin

JohnHansknecht

  • Newbie
  • *
  • Posts: 11
    • http://www.uofdjesuit.org
Problem with createSchema.sh
« Reply #2 on: March 06, 2008, 09:23:24 am »
Thanks for you assistance, regarding which versions are the PHP, MySQL, or XAMPP if applicable? We are not running XAMPP, but rather the versions of the applications that come with RHEL5. It has PHP 5.1.6-15.el5 and mysql 5.0.2202.2.el5_1.1.

Also, after adding the line "$conn->query($sql); " before line 137 and rerunning the createSchema.sh I recevied the following output

[root@server02 database]# ./createSchema.sh
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerAppender.php on line 73
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerPropertyConfigurator.php on line 565
PHP Parse error:  syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemDbSetup.php on line 140
hanks,

John

calemadmin

  • Administrator
  • Calem Hero
  • *****
  • Posts: 300
    • http://www.calemeam.com
Problem with createSchema.sh
« Reply #3 on: March 06, 2008, 10:56:33 am »
My oversight. Let's try again.
a) remove "$conn->query($sql);" added before line 137
b) find line 149 which is:
$conn->query($sql);
c) insert the following before line 149:
$conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
d) save the file and run the script again.
Calem Community Forum Admin

JohnHansknecht

  • Newbie
  • *
  • Posts: 11
    • http://www.uofdjesuit.org
Now a problem with loadInitData.sh
« Reply #4 on: March 06, 2008, 12:37:20 pm »
OK, your last fix resulted in the createSchema.sh script running without error and the database was created.  I then went to run loadInitData.sh and received the following error:

[root@server02 database]# ./loadInitData.sh
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerAppender.php on line 73
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerPropertyConfigurator.php on line 565
March 6, 2008, 1:32:36 pm - Loading init data...<br>
PHP Fatal error:  Uncaught exception 'PDOException' with message 'There is no active transaction' in /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemPdo.php:201
Stack trace:
#0 /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemPdo.php(201): PDO->rollBack()
#1 /home/studentuofdjesuitssl/html/CalemEAM/server/setup/CalemDataLoader.php(111): CalemPdo->rollback()
#2 /home/studentuofdjesuitssl/html/CalemEAM/server/setup/CalemDataLoader.php(140): CalemDataLoader->updateRecord(Object(CalemTableDd), Array)
#3 /home/studentuofdjesuitssl/html/CalemEAM/server/setup/CalemDataLoader.php(176): CalemDataLoader->loadFile(Object(CalemTableDd), '/home/studentuo...')
#4 /home/studentuofdjesuitssl/html/CalemEAM/server/setup/LoadInitDataCmd.php(52): CalemDataLoader->load(Object(CalemDataLoadConf))
#5 {main}
  thrown in /home/studentuofdjesuitssl/html/CalemEAM/server/include/core/database/CalemPdo.php on line 201
hanks,

John

calemadmin

  • Administrator
  • Calem Hero
  • *****
  • Posts: 300
    • http://www.calemeam.com
Problem with createSchema.sh
« Reply #5 on: March 06, 2008, 01:36:57 pm »
ciodiom contributed a workaround for 'no active transaction' issue, you may give it a try:
http://www.calemeam.com/apps/mantis/view.php?id=81
Calem Community Forum Admin