I am trying to get PDO for sqlite to work on my localhost system. I
have modified the PHP5.ini file as shown below and run the following
PHP script. As stated below, it reports the mssql, mysql and sqlite2
drivers but then gives a "could not find driver" exception. Any help
is greatly appreciated. Also, I am concerned if PDO for sqlite is
widely supported by hosting companies, any input or opinions on that?
<?php
foreach(PDO::ge tAvailableDrive rs() as $driver)
{
echo $driver.'<br />';
}
try {
/*** connect to SQLite database ***/
$dbh = new PDO("sqlite:./johns.db");
}
catch(PDOExcept ion $e)
{
echo $e->getMessage() ;
}
?>
Reports available drivers as mssql, mysql and sqlite2 (strange it is
sqlite2 when PDO is sqlite3 from what I understand)
Then throws the exception "could not find driver"
PHP.ini settings are:
extension=php_p do.dll
;extension=php_ pdo_firebird.dl l
extension=php_p do_mssql.dll
extension=php_p do_mysql.dll
;extension=php_ pdo_oci.dll
;extension=php_ pdo_oci8.dll
;extension=php_ pdo_odbc.dll
;extension=php_ pdo_pgsql.dll
extension=php_p do_sqlite.dll
;extension=php_ perl.dll
extension=php_p gsql.dll
;extension=php_ phpdoc.dll
;extension=php_ pop3.dll
;extension=php_ printer.dll
;extension=php_ pspell.dll
;extension=php_ radius.dll
;extension=php_ runkit.dll
;extension=php_ sdo.dll
;extension=php_ sdo_das_xml.dll
;extension=php_ shmop.dll
;extension=php_ smtp.dll
;extension=php_ snmp.dll
extension=php_s oap.dll
extension=php_s ockets.dll
extension=php_s qlite.dll
and php_pdo_sqlite. dll is found in the /php/ext/ directory.
TIA,
John
have modified the PHP5.ini file as shown below and run the following
PHP script. As stated below, it reports the mssql, mysql and sqlite2
drivers but then gives a "could not find driver" exception. Any help
is greatly appreciated. Also, I am concerned if PDO for sqlite is
widely supported by hosting companies, any input or opinions on that?
<?php
foreach(PDO::ge tAvailableDrive rs() as $driver)
{
echo $driver.'<br />';
}
try {
/*** connect to SQLite database ***/
$dbh = new PDO("sqlite:./johns.db");
}
catch(PDOExcept ion $e)
{
echo $e->getMessage() ;
}
?>
Reports available drivers as mssql, mysql and sqlite2 (strange it is
sqlite2 when PDO is sqlite3 from what I understand)
Then throws the exception "could not find driver"
PHP.ini settings are:
extension=php_p do.dll
;extension=php_ pdo_firebird.dl l
extension=php_p do_mssql.dll
extension=php_p do_mysql.dll
;extension=php_ pdo_oci.dll
;extension=php_ pdo_oci8.dll
;extension=php_ pdo_odbc.dll
;extension=php_ pdo_pgsql.dll
extension=php_p do_sqlite.dll
;extension=php_ perl.dll
extension=php_p gsql.dll
;extension=php_ phpdoc.dll
;extension=php_ pop3.dll
;extension=php_ printer.dll
;extension=php_ pspell.dll
;extension=php_ radius.dll
;extension=php_ runkit.dll
;extension=php_ sdo.dll
;extension=php_ sdo_das_xml.dll
;extension=php_ shmop.dll
;extension=php_ smtp.dll
;extension=php_ snmp.dll
extension=php_s oap.dll
extension=php_s ockets.dll
extension=php_s qlite.dll
and php_pdo_sqlite. dll is found in the /php/ext/ directory.
TIA,
John
Comment