ID:               35345
 Comment by:       smlerman at gmail dot com
 Reported By:      csaba at alum dot mit dot edu
 Status:           Feedback
 Bug Type:         PDO related
 Operating System: Win XP Pro
 PHP Version:      5CVS-2005-11-23 (snap)
 Assigned To:      wez
 New Comment:

I had the same problem. I had extension=php_pdo.dll (plus the drivers
for MySQL, Postgres, and SQLite) after the extensions list in
php.ini-dist. Moving those lines up above, so that they're before
extension=php_sqlite.dll, fixed the problem. Definitely something that
needs to be added to the installation docs for SQLite. It also might be
a good idea to add the PDO extensions to php.ini-dist. Since the PDO
extensions would be before the SQLite extension in alphabetical order
anyway, most people would never notice the dependency.


Previous Comments:
------------------------------------------------------------------------

[2005-11-23 10:54:25] [EMAIL PROTECTED]

For reasons discussed on the mailing list recently (see the threads on
PHP 5.1 upgrade notes), ext/sqlite depends on the PDO extension,
because it provides a sqlite2 PDO driver.

You need to ensure that the PDO extension is loaded before the sqlite
extension.

------------------------------------------------------------------------

[2005-11-23 10:10:08] csaba at alum dot mit dot edu

Description:
------------
I downloaded a new snapshot (.zip) of PHP (version 5.1.0 RC7), stopped
Apache 2 and overwrote the prior extracted files (about 10), all
sitting in c:\winapps\php.net.  In addition, I also extracted
php_sqlite.dll to the same directory (since my sqlite code which had
been relying on PHP 5.1 of Aug 31 no longer functioned).

Next I went into c:\windows\php.ini and added the line
extension=php_sqlite.dll
(the only other extension I have loading is php_shmop.dll).

* Note, at the least there seems to be a documentation bug because
php.net/sqlite says to add php_extension=php_sqlite.dll *

Now when I go to restart apache 2, I get the following confirm
alert/msgbox twice:
Warning
PHP Startup: Unable to load dynamic library './php_sqlite.dll' - The
specified module could not be found.

This is an exceptionally unhelpful message as a normal person would
suspect that there is a problem locating php_sqlite.dll as that is the
only thing specified.  At any rate, the loading is successful if I also
add extension=php_pdo.dll to php.ini and plunk php_pdo.dll into the main
directory.  Without setting extension nor file for php_pdo_sqlite.dll

Thanks,
Csaba Gabor from Vienna

Expected result:
----------------
1.  I expect that all I need to run my older code is php_sqlite.dll
I do not expect to need php_pdo.dll which I do not currently utilitze
in my code.  php_pdo.dll should be relying on php_sqlite.dll, if
anything, and not the other way around.

2.  I expect the docs in http://php.net/sqlite (and perhaps also
http://php.net/pdo-sqlite) to mention when I should use only
php_sqlite.dll (and set extension), when I need to include php_pdo.dll
(and whether I should use php_sqlite.dll with it or php_pdo_sqlite.dll
or both).

Actual result:
--------------
1.  php_sqlite.dll seems to require php_pdo.dll to function.  This
seems counterintuitive, at best.

2.  A user (me) is sure to wonder how the two ...sqlite.dll come into
play.  This is in addition/commensurate with being confused about how
to swap drivers between v2 and 3 and when one would want to do so.  In
other words, there seem to be possibilities of with/without pdo, v2 or
v3 drivers, and two distinct sqlite dll's.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35345&edit=1

Reply via email to