Current time: 11-26-2024, 05:53 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
editing system created admin give data base error
Author Message
eagles051387 Offline
Newbie
*

Posts: 6
Joined: May 2011
Reputation: 0
Post: #1
editing system created admin give data base error
hey guys im having an issue with ispcp 1.0.7 on centos 5.6. i had to make a few modifications to 3 installation scripts which were giving me grief on centos 5.6 and version 5.8 of perl. without those modifications installation woudl not have been successful.

the error im getting is

Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. - Query: SELECT `admin_id`, `created_by`, `admin_type` FROM `admin` WHERE `admin_id` = ? ;

what needs to be done to remedy the situation?
06-02-2011 12:58 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: editing system created admin give data base error
See this thread for a possible fix.
06-07-2011 04:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
eagles051387 Offline
Newbie
*

Posts: 6
Joined: May 2011
Reputation: 0
Post: #3
RE: editing system created admin give data base error
(06-07-2011 04:14 AM)kilburn Wrote:  See this thread for a possible fix.

i found that but what file should i be touching to fix the issue as it doesnt specify what file needs to be modified.
06-07-2011 05:06 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: editing system created admin give data base error
(05-15-2011 05:53 PM)kilburn Wrote:  I don't really understand the problem, but I think you can work-around it by searching for
Code:
$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);
in the ispcp gui sources (/var/www/ispcp/gui/include) and replacing it by
Code:
$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, true);
.

So you just had to search for that:
Code:
horus ~ # cd /var/www/ispcp/gui/include/
horus include # grep -R '$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);' *
ispCP/Database.php:                $this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);

There you go, the file is "/var/www/ispcp/gui/include/ispCP/Database.php".
06-07-2011 04:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagles051387 Offline
Newbie
*

Posts: 6
Joined: May 2011
Reputation: 0
Post: #5
RE: editing system created admin give data base error
(06-07-2011 04:21 PM)kilburn Wrote:  
(05-15-2011 05:53 PM)kilburn Wrote:  I don't really understand the problem, but I think you can work-around it by searching for
Code:
$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);
in the ispcp gui sources (/var/www/ispcp/gui/include) and replacing it by
Code:
$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, true);
.

So you just had to search for that:
Code:
horus ~ # cd /var/www/ispcp/gui/include/
horus include # grep -R '$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);' *
ispCP/Database.php:                $this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);

There you go, the file is "/var/www/ispcp/gui/include/ispCP/Database.php".


Mine is already set right but in that file it seems like there is an if else statement with thwhat you have above and the else returns a false, which seems to be where I end up.

to be honest im not 100% what that does, and what the ramifications would be if i were to set that to true.
06-07-2011 04:29 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: editing system created admin give data base error
I'm not 100% sure of what it does either, but it fixed the problem for another user (yes, you should change the else part, that is giving you the error). Furthermore, according to the error itself, it is safe to enable query buffering if you only run queries against mysql (and the panel does precisely that).
06-08-2011 07:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagles051387 Offline
Newbie
*

Posts: 6
Joined: May 2011
Reputation: 0
Post: #7
RE: editing system created admin give data base error
(06-08-2011 07:06 PM)kilburn Wrote:  I'm not 100% sure of what it does either, but it fixed the problem for another user (yes, you should change the else part, that is giving you the error). Furthermore, according to the error itself, it is safe to enable query buffering if you only run queries against mysql (and the panel does precisely that).

the only false statement there is i tested it and changed to true this morning and it wouldnt let me login. its like it cant query the database

is there a particular version of mysql i should be using im using 5.0.67 on centos 5.6
(This post was last modified: 06-08-2011 07:09 PM by eagles051387.)
06-08-2011 07:07 PM
Find all posts by this user Quote this message in a reply
eagles051387 Offline
Newbie
*

Posts: 6
Joined: May 2011
Reputation: 0
Post: #8
RE: editing system created admin give data base error
I have a strange fix. I managed to get ispcp successfully installed by excluding all 32bit apps via an exclude in yum. also i installed 5.5.13 mysql out of remi repo. the next major hack involved setting up a perlbrew environment and installing perl 5.14.0 and setting that in the .bashrc to start each time you login or reboot. i installed the necessary perl modules that ISPCP needs and then installed from there successfully.

Its a very nasty hack but you avoid the database issue above all together and no modifications to the installation scripts need to occur.
06-08-2011 11:36 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)