Page 1 of 1

libsqlite3.dll (present but) not found

PostPosted: 09. January 2020 11:27
by pschleppi
Hi,

I have a fresh install of XAMPP 3.4.2. When starting Apache, there is an error message telling that libsqlite3.dll could not be found. This message appers even twice. In the log, there are the lines given below. Nevertheless, the Apache modules becomes green on XAMPP's control panel and localhost is available. I tried to set up an SQLite database as described in the documentation (/dashboard/docs/use-sqlite.html), but it fails with the eror that sqlite3 is not recognised as a command. In phpinfo, sqlite is missing.
The strange thing is that the libsqlite3.dll file is present in the php folder. It is a version dated 2019-12-17.I tried to register this DLL with regsvr32, just out of my general knowledge about DLLs. No success. Another DLL mentioned in the log (see below) is php_pdo_sqlite.dll. It is also present, in the ext folder under php.
Is there a way to correct this problem?

Patrick
--

[Thu Jan 09 10:51:56.059482 2020] [mpm_winnt:notice] [pid 1432:tid 252] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.1 configured -- resuming normal operations
[Thu Jan 09 10:51:56.059482 2020] [mpm_winnt:notice] [pid 1432:tid 252] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
[Thu Jan 09 10:51:56.059482 2020] [core:notice] [pid 1432:tid 252] AH00094: Command line: 'c:\\internet\\xampp\\apache\\bin\\httpd.exe -d C:/Internet/Xampp/apache'
[Thu Jan 09 10:51:56.059482 2020] [mpm_winnt:notice] [pid 1432:tid 252] AH00418: Parent: Created child process 3176
[Thu Jan 09 10:51:56.543082 2020] [ssl:warn] [pid 3176:tid 264] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 09 10:51:56.621083 2020] [ssl:warn] [pid 3176:tid 264] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: C:\\Internet\\Xampp\\php\\ext\\pdo_sqlite (Le module sp\xc3\xa9cifi\xc3\xa9 est introuvable.), C:\\Internet\\Xampp\\php\\ext\\php_pdo_sqlite.dll (Le module sp\xc3\xa9cifi\xc3\xa9 est introuvable.)) in Unknown on line 0
[Thu Jan 09 10:51:58.541486 2020] [mpm_winnt:notice] [pid 3176:tid 264] AH00354: Child: Starting 150 worker threads.

Re: libsqlite3.dll (present but) not found

PostPosted: 09. January 2020 19:46
by gsmith
Copy the one from the php folder to Apache's bin folder.

Re: libsqlite3.dll (present but) not found

PostPosted: 10. January 2020 23:10
by pschleppi
Thank you gsmith!
This was the solution! The file was there, but not at the right place.

Cheers.

Patrick

Re: libsqlite3.dll (present but) not found

PostPosted: 02. March 2020 02:06
by master777
gsmith wrote:Copy the one from the php folder to Apache's bin folder.


Hi gsmith,

I registered only to thank you. I had the same problem but copying the file was the solution.

Thank you again!

Re: libsqlite3.dll (present but) not found

PostPosted: 30. March 2020 07:44
by rene-n
Alternatively, you might want to make sure that libsqlite3.dll is referenced in the PATH environment variable when httpd is started.

Re: libsqlite3.dll (present but) not found

PostPosted: 30. March 2020 08:56
by Altrea
XAMPP tries to avoid using the PATH variable, registry, etc. All needed settings and files should be inside the xampp folder for portability reasons.
There are a few exceptions from this like the uninstaller or using windows services to autostart components, but a simple dll should not be such a reason.

Re: libsqlite3.dll (present but) not found

PostPosted: 25. January 2021 07:28
by Neustradamus
The problem is always here in xampp-windows-x64-7.4.14-0-VC15 and other I think.

In \xampp\apache\conf\extra\httpd-xampp.conf

Search:
LoadModule php7_module "/xampp/php/php7apache2_4.dll"

Add after:
LoadFile "/xampp/php/libsqlite3.dll"

Restart Apache, it works.

Re: libsqlite3.dll (present but) not found

PostPosted: 26. February 2021 11:03
by bblake
Just wanted to thank Neustradamas for suggesting the addition of this line "/xampp/php/libsqlite3.dll" to httpd-xampp.conf That's cleaned up my Apache error log substantially. I was working on a different problem, but wanted to clean up the error log as I could then see what was going on.