Installer support for 'sqlite' or 'pgsql'.

51 views
Skip to first unread message

Austin Saint Aubin

unread,
Aug 11, 2014, 11:25:39 AM8/11/14
to siwap...@googlegroups.com
Have recommendation for updating ( sf_web_dir/pre_installer_code.php ).
I added support to install on system that is using 'sqlite' or 'pgsql'.
Have tested on my Synology NAS that only has 'sqlite' and 'pgsql' PDO drive.

ORIGNAL CODE:
  // PDO mysql driver
  $wrong
['pdo_mysql'] = !in_array('mysql', array_map(
                                                     
'strtolower',
                                                     PDO
::getAvailableDrivers()
                                                     
));

UPDATED CODE:
  // PDO mysql driver
  $wrong
['pdo_mysql'] = true;
 
foreach (array('mysql', 'sqlite', 'pgsql') as $pdo_needle) {
   
if ( in_array($pdo_needle, array_map('strtolower', PDO::getAvailableDrivers())) ) {
      $wrong
['pdo_mysql'] = false;
   
}
 
}

pre_installer_code.php
Reply all
Reply to author
Forward
0 new messages