Current time: 10-20-2020, 01:43 AM Hello There, Guest! (LoginRegister)


Post Reply 
Upgrade Error. Ubuntu Hardy, ispcp 1.0.7
Author Message
patrick.geschke Offline
Junior Member
*

Posts: 13
Joined: Nov 2009
Reputation: 0
Post: #1
Upgrade Error. Ubuntu Hardy, ispcp 1.0.7
Hey,

after upgrading to 1.0.7 i first had a problem with mcrypt not beeing loaded properly.

Now that that is fixed, I get the following error:


Dear admin,

An exception with the following message was raised in file
/var/www/ispcp/gui/include/sql.php (Line: 90):

=================================================================

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` = ?
;

=================================================================

Debug backtrace:
---------------

File: /var/www/ispcp/gui/include/admin-functions.php (Line: 1546)
Function: exec_query()
File: /var/www/ispcp/gui/admin/index.php (Line: 183)
Function: get_logo()

Additional information:
----------------------

Http User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6)
AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.65
Safari/534.24
Request Uri: /admin/index.php
Remote Addr: 78.47.96.93
Server Addr: 87.230.25.89

____________________________________________________________
ispCP Exception Mail Writer


Note: If the same exception is raised several times, this mail will
not be re-send before 6 hours.


Anyone got an idea on how to solve?

Kind Regards,
Patrick
05-14-2011 07:15 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: #2
RE: Upgrade Error. Ubuntu Hardy, ispcp 1.0.7
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);
.
05-15-2011 05:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
patrick.geschke Offline
Junior Member
*

Posts: 13
Joined: Nov 2009
Reputation: 0
Post: #3
RE: Upgrade Error. Ubuntu Hardy, ispcp 1.0.7
Okay, that actually worked.

This is the modified code:

PHP Code:
public function prepare($stmt$driver_options null) {

                if (
version_compare(PHP_VERSION'5.2.5''<')) {
                        if (
preg_match('/(ALTER |CREATE |DROP |GRANT |REVOKE |FLUSH )/i',
                                
$stmt)) {

                                
$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERYtrue);
                        } else {
                                
$this->_db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERYtrue);
                        }
                } 

What Did this modification do?
And will I get into problems in future? On Upgrades/Etc.?

Regards,
Patrick
05-15-2011 11:17 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)