Persistent connection in Drupal

by Nikita Yunoshev   Last Updated May 16, 2018 14:07 PM

Here is part of my config file

$databases = array (
    'default' => array (
        'default' => array (
            'database' => 'my_db',
            'username' => 'root',
            'password' => '',
            'host' => 'localhost',
            'port' => '',
            'driver' => 'mysql',
            'prefix' => '',
            'pdo' => array(
                PDO::ATTR_PERSISTENT => TRUE
            ),
        ),
  ),

When I added

'pdo' => array(
     PDO::ATTR_PERSISTENT => TRUE
 ),

Apache and MySql logs shows me nothing. If I change TRUE to FALSE everything is fine. So there is no problem with syntax. I'm doing this because I want to enable persistent connection on my site. I faced the error in chrome

didn’t send any data.
ERR_EMPTY_RESPONSE

Initiator - chrome-error://chromewebdata/:4225. How can I fix it?

P.S. Drupal 7, Php 5.4

Tags : settings.php


Related Questions




What module should I install for php?

Updated June 02, 2015 11:03 AM


How to read and write settings.php dynamically

Updated June 18, 2015 23:03 PM