Roundcube Community Forum

Release Support => Pending Issues => Topic started by: feinraf on August 04, 2013, 09:25:26 AM

Title: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS'
Post by: feinraf on August 04, 2013, 09:25:26 AM
Hi, I am getting this error when checking the database in the Roundcube installation.

Fatal error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /program/lib/Roundcube/rcube_db_mysql.php on line 134

Here is line 134:

$result[PDO::MYSQL_ATTR_FOUND_ROWS] = true;

Here is the rest of the code around it for some more detail:


protected function dsn_options($dsn)
    {
        $result = array();

        if (!empty($dsn['key'])) {
            $result[PDO::MYSQL_ATTR_KEY] = $dsn['key'];
        }

        if (!empty($dsn['cipher'])) {
            $result[PDO::MYSQL_ATTR_CIPHER] = $dsn['cipher'];
        }

        if (!empty($dsn['cert'])) {
            $result[PDO::MYSQL_ATTR_SSL_CERT] = $dsn['cert'];
        }

        if (!empty($dsn['capath'])) {
            $result[PDO::MYSQL_ATTR_SSL_CAPATH] = $dsn['capath'];
        }

        if (!empty($dsn['ca'])) {
            $result[PDO::MYSQL_ATTR_SSL_CA] = $dsn['ca'];
        }

        // Always return matching (not affected only) rows count
        $result[PDO::MYSQL_ATTR_FOUND_ROWS] = true;

        // Enable AUTOCOMMIT mode (#1488902)
        $dsn_options[PDO::ATTR_AUTOCOMMIT] = true;

        return $result;
    }


My server is running PHP 5.3.26 and it has the pdo_mysql thing installed too.

(http://i.imgur.com/3V0cPWW.png)

-

Any suggestions?
Title: Re: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS'
Post by: SKaero on August 04, 2013, 01:59:19 PM
Some people have fixed the error it by recompiling php, what version of php are you running?
Title: Re: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS'
Post by: Dennis1993 on August 04, 2013, 03:45:25 PM
Quote from: SKaero on August 04, 2013, 01:59:19 PM
[...]what version of php are you running?

Quote from: feinraf on August 04, 2013, 09:25:26 AM
[...] My server is running PHP 5.3.26 and it has the pdo_mysql thing installed too. [...]

:D
Title: Re: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS'
Post by: SKaero on August 04, 2013, 03:52:20 PM
Sorry I didn't see that, the only thing I can suggest is to recompiling php.