php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78957 pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0
Submitted: 2019-12-13 02:25 UTC Modified: 2019-12-16 09:36 UTC
From: silverwoodchuck47 at yahoo dot com Assigned: cmb (profile)
Status: Closed Package: PDO SQLite
PHP Version: 7.4.0 OS: Win7-32/Apache 2.24.41
Private report: No CVE-ID: None
 [2019-12-13 02:25 UTC] silverwoodchuck47 at yahoo dot com
Description:
------------
My scripts that depend on sqlite don't work work anymore because pdo_sqlite extension does not load.  It works for 7.3.12, but not 7.4.0.


Test script:
---------------
$dbhnd = new PDO("sqlite:". $database);

Expected result:
----------------
I expect that if I replace php 7.3.12 with 7.4.0 AND there's no mention of removing sqlite extension from PHP core, that php scripts that depend on the sqlite extension to work.

All other extensions ("gd", "mbstring", "exif", "xsl") load just fine.  pdo_sqlite does not.



Actual result:
--------------
For example, one error message is

PDOException: could not find driver in D:\xxx\x.php:110 Stack trace: #0 D:\xxx\x.php(110): PDO->__construct('sqlite:lkp/lkpM...') #1 D:\yyy\y.php(65): include('D:\\Data\\xxx\\i...') #2 {main}

Another

PDOException: could not find driver in D:\xxx\x.php:42 Stack trace: #0 D:\Data\xxx\x.php(42): PDO->__construct('sqlite:lkp/lkpM...') #1 {main}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-12-13 04:13 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2019-12-13 04:13 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

How much troubleshooting have you done? Any errors?

And are you using libsqlite >= 3.5.0 as stated in the documentation?
https://www.php.net/manual/en/ref.pdo-sqlite.php
 [2019-12-13 16:15 UTC] silverwoodchuck47 at yahoo dot com
How much troubleshooting have you done? 
As much as I can do.  That's why I wrote this bug report.

Any errors?
Yes, as shown in Actual result.

And are you using libsqlite >= 3.5.0 as stated in the documentation?
I don't know.  How does one check?  It doesn't show up in phpinfo.  Should it? 

The sentence "As of PHP 7.4.0 » libsqlite ≥ 3.5.0 is required." in the documentation is not helpful to me.  The link goes to the sqlite website, but there is no "libsqlite" file that I can find.  Does "libsqlite" refer to "libsqlite3.dll" that comes with the php-7.4.0-Win32-vc15-x86.zip?  If it does, can the documentation be improved for those of us who are not professional programmers?
 [2019-12-16 00:41 UTC] silverwoodchuck47 at yahoo dot com
I finally figured it out.  

Copy libsqlite3.dll that comes with php (in my case, php-7.4.0-Win32-vc15-x86.zip) to somewhere in the Windows path (in my case, I chose c:\windows\).  Then restart the web server.  Go to phpinfo.php: that shows the PDO drivers: sqlite and SQLite Library 3.30.1.

So this is not a bug, but a change in how to install PHP that is not documented in https://www.php.net/manual/en/migration74.windows-support.php.

Please close this bug report.
 [2019-12-16 00:41 UTC] silverwoodchuck47 at yahoo dot com
-Status: Feedback +Status: Closed
 [2019-12-16 00:41 UTC] silverwoodchuck47 at yahoo dot com
So this is not a bug, but a change in how to install PHP that is not documented in https://www.php.net/manual/en/migration74.windows-support.php.
 [2019-12-16 09:06 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened -Type: Bug +Type: Documentation Problem -Assigned To: +Assigned To: cmb
 [2019-12-16 09:35 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=348532
Log: Fix #78957: pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0
 [2019-12-16 09:36 UTC] cmb@php.net
-Status: Re-Opened +Status: Closed
 [2019-12-16 09:36 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2019-12-16 09:40 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=f55cb6e18f93f372eaa72edb985d773ceca31b16
Log: Fix #78957: pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0
 [2019-12-16 14:40 UTC] mumumu@php.net
Automatic comment from SVN on behalf of mumumu
Revision: http://svn.php.net/viewvc/?view=revision&revision=348542
Log: Fix #78957: pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0

Bug: https://bugs.php.net/78957 (Re-Opened) pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0
 [2020-01-21 00:54 UTC] daniel at hoolihan dot org
tip for windows, the path variable must be accessible to the process running the webserver, running apache as a service means putting it in user path wont work, needs to be in system path.

hopefully this saves you the 3 days it took me to figure that out. :(
 [2020-02-07 06:04 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=859713422861ee5d25d5e8504928a4af9ce198ad
Log: Fix #78957: pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=b303de4ccaff2d902f308711d6fbc5f5ebd6c2e9
Log: Fix #78957: pdo_sqlite extension does not load after upgrading from 7.3.12 to 7.4.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 09 23:01:26 2024 UTC