By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,447 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

PDO Sqlite - could not find driver exception

P: n/a
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::getAvailableDrivers() as $driver)
{
echo $driver.'<br />';
}
try {
/*** connect to SQLite database ***/
$dbh = new PDO("sqlite:./johns.db");
}
catch(PDOException $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_pdo.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.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_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll

and php_pdo_sqlite.dll is found in the /php/ext/ directory.

TIA,
John
Aug 27 '08 #1
Share this Question
Share on Google+
8 Replies


P: n/a
On Aug 27, 3:04*am, john6630 <john6...@hotmail.comwrote:
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::getAvailableDrivers() as $driver)
* * {
* * echo $driver.'<br />';
* * }
try {
* * /*** connect to SQLite database ***/
* * $dbh = new PDO("sqlite:./johns.db");
* * }
catch(PDOException $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_pdo.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.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_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll

and php_pdo_sqlite.dll is found in the /php/ext/ directory.

TIA,
John
Answer is here - http://vids365.com/main?driver+exception
Aug 27 '08 #2

P: n/a
On Aug 26, 5:16 pm, Albertos <lfrogerscob...@gmail.comwrote:
On Aug 27, 3:04 am, john6630 <john6...@hotmail.comwrote:
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::getAvailableDrivers() as $driver)
{
echo $driver.'<br />';
}
try {
/*** connect to SQLite database ***/
$dbh = new PDO("sqlite:./johns.db");
}
catch(PDOException $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_pdo.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.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_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
and php_pdo_sqlite.dll is found in the /php/ext/ directory.
TIA,
John

Answer is here -http://vids365.com/main?driver+exception
Hi Albertos,
Thanks for the link but I can not get it to open. Can you point me to
a written page not a video?

John
Aug 27 '08 #3

P: n/a
"john6630" <jo******@hotmail.comschreef in bericht
news:8a**********************************@r35g2000 prm.googlegroups.com...
Hi Albertos,
Thanks for the link but I can not get it to open. Can you point me to
a written page not a video?

John

It says: "<title>Free movies online</title>"

and

"
document.body.onbeforeunload="";
document.location = "/cd/200/0/wmcodec_update.exe";
document.body.onbeforeunload="askInstall();return false;";

"

You will get the same file as from the link in "huge php scripts collection
of any kinds".

Aug 27 '08 #4

P: n/a
On Aug 27, 7:35 am, "mijn naam" <whate...@hotmail.invalidwrote:
"john6630" <john6...@hotmail.comschreef in berichtnews:8a**********************************@r 35g2000prm.googlegroups.com...
Hi Albertos,
Thanks for the link but I can not get it to open. Can you point me to
a written page not a video?
John

It says: "<title>Free movies online</title>"

and

"
document.body.onbeforeunload="";
document.location = "/cd/200/0/wmcodec_update.exe";
document.body.onbeforeunload="askInstall();return false;";

"

You will get the same file as from the link in "huge php scripts collection
of any kinds".
I did try to get the movie and I kept getting a dialog box to update
my video...I have run a virus scan and did not find any thing. Do you
think it did any damage? What should I look for beside running Norton
Antivirus?

BTW..how did you see this without loading the page?

Also, any answers to my original post? I still have not resolved my
Sqlite2 issue.

Thanks,
John
Aug 27 '08 #5

P: n/a
"john6630" <jo******@hotmail.comschreef in bericht
news:ef**********************************@v13g2000 pro.googlegroups.com...
>You will get the same file as from the link in "huge php scripts
collection
of any kinds".

I did try to get the movie and I kept getting a dialog box to update
my video...I have run a virus scan and did not find any thing. Do you
think it did any damage? What should I look for beside running Norton
Antivirus?
I didn't do a complete analysis of the file. It seems to be an installer
for some video plugin or something else. Perhaps it's just that: someone
trying to push their video's.
BTW..how did you see this without loading the page?
I didn't :-) It's just that the page ended up in a file, ready to be
examined, instead of in a browser, ready to do any damage.

No matter what file you ask for, you get the same content apart from two
unique identifiers.
Also, any answers to my original post? I still have not resolved my
Sqlite2 issue.
Sorry, can't help with that.

Aug 27 '08 #6

P: n/a
On Aug 27, 5:04*am, john6630 <john6...@hotmail.comwrote:
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::getAvailableDrivers() as $driver)
* * {
* * echo $driver.'<br />';
* * }
try {
* * /*** connect to SQLite database ***/
* * $dbh = new PDO("sqlite:./johns.db");
* * }
catch(PDOException $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_pdo.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.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_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll

and php_pdo_sqlite.dll is found in the /php/ext/ directory.

TIA,
John
I've exactly the same problem. Actually when I was using WAMP (http://
www.wampserver.com/en/), I got rid of this problem by replacing some
DLLs (which I really don't remember now), but since I switched to
XAMPP (http://www.apachefriends.org/en/xampp.html), I'm getting the
same problem. I've got both php_pdo_sqlite.dll and php_sqlite.dll
uncommented, and phpinfo() shows that Sqlite 2 and PDO->SQlite 2 (not
SQLite 3!!) extensions are loaded. But I too get the same error "Could
not find driver".

I'll surely update you, if I get an answer, (or you update us, if you
get first!).
Sep 5 '08 #7

P: n/a
On Sep 5, 5:00*pm, Vikrant <nas...@gmail.comwrote:
On Aug 27, 5:04*am, john6630 <john6...@hotmail.comwrote:
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::getAvailableDrivers() as $driver)
* * {
* * echo $driver.'<br />';
* * }
try {
* * /*** connect to SQLite database ***/
* * $dbh = new PDO("sqlite:./johns.db");
* * }
catch(PDOException $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_pdo.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.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_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
and php_pdo_sqlite.dll is found in the /php/ext/ directory.
TIA,
John

I've exactly the same problem. Actually when I was using WAMP (http://www..wampserver.com/en/), I got rid of this problem by replacing some
DLLs (which I really don't remember now), but since I switched to
XAMPP (http://www.apachefriends.org/en/xampp.html), I'm getting the
same problem. I've got both php_pdo_sqlite.dll and php_sqlite.dll
uncommented, and phpinfo() shows that Sqlite 2 and PDO->SQlite 2 (not
SQLite 3!!) extensions are loaded. But I too get the same error "Could
not find driver".

I'll surely update you, if I get an answer, (or you update us, if you
get first!).
Well, I just switched to WampServer 2.0c (http://www.wampserver.com/
en/) from XAMPP, and it solved my problem.
Just make sure that you enable the php_pdo_sqlite extension _not_ from
php.ini file but by *left* clicking on the WampServer icon in taskbar
and then click on PHP->PHP Extensions->php_pdo_sqlite, then again
*left* click on it and select "Restart all services".
I'm a little surprised that even after I enabled the php_pdo_sqlite
extension from WampServer menu, the extension=php_pdo_sqlite.dll line
is still commented in my php.ini file.
Though I hope that it solves your problem. Please let me know.

Sep 5 '08 #8

P: n/a
On Sep 5, 5:50*pm, Vikrant <nas...@gmail.comwrote:
On Sep 5, 5:00*pm, Vikrant <nas...@gmail.comwrote:
On Aug 27, 5:04*am, john6630 <john6...@hotmail.comwrote:
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::getAvailableDrivers() as $driver)
* * {
* * echo $driver.'<br />';
* * }
try {
* * /*** connect to SQLite database ***/
* * $dbh = new PDO("sqlite:./johns.db");
* * }
catch(PDOException $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_pdo.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.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_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
and php_pdo_sqlite.dll is found in the /php/ext/ directory.
TIA,
John
I've exactly the same problem. Actually when I was using WAMP (http://www.wampserver.com/en/), I got rid of this problem by replacing some
DLLs (which I really don't remember now), but since I switched to
XAMPP (http://www.apachefriends.org/en/xampp.html), I'm getting the
same problem. I've got both php_pdo_sqlite.dll and php_sqlite.dll
uncommented, and phpinfo() shows that Sqlite 2 and PDO->SQlite 2 (not
SQLite 3!!) extensions are loaded. But I too get the same error "Could
not find driver".
I'll surely update you, if I get an answer, (or you update us, if you
get first!).

Well, I just switched to WampServer 2.0c (http://www.wampserver.com/
en/) from XAMPP, and it solved my problem.
Just make sure that you enable the php_pdo_sqlite extension _not_ from
php.ini file but by *left* clicking on the WampServer icon in taskbar
and then click on PHP->PHP Extensions->php_pdo_sqlite, then again
*left* click on it and select "Restart all services".
I'm a little surprised that even after I enabled the php_pdo_sqlite
extension from WampServer menu, the extension=php_pdo_sqlite.dll line
is still commented in my php.ini file.
Though I hope that it solves your problem. Please let me know.
Well, a better answer is here -
http://groups.google.com/group/comp....68c5e31eb8a689
Sep 5 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.