SQLite DLL on Windows with PHP
(1.1) By BoonDock on 2021-01-08 02:37:24 edited from 1.0 [link] [source]
I have downloaded the latest precompiled binaries for Win X64 and extracted them to my PHP folder.
When I run
php --version I get
./php --version PHP Warning: PHP Startup: Can't load module 'c:\php\sqlite3.DLL' as it's linked with 9.0, but the core is linked with 14.28 in Unknown on line 0
Warning: PHP Startup: Can't load module 'c:\php\sqlite3.DLL' as it's linked > with 9.0, but the core is linked with 14.28 in Unknown on line 0 PHP 8.0.0 (cli) (built: Nov 24 2020 22:02:58) ( NTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
Any ideas how I can fix this?
(2) By anonymous on 2021-01-08 13:25:03 in reply to 1.1 [link] [source]
This is a PHP error message, not an SQLite error message. It seems to indicate that SQLite and PHP have to be linked with same (or at least compatible) versions of Microsoft Visual C Runtime Library, and your configuration is not compatible. Try building your own
sqlite3.dll with the same compiler that built your copy of PHP.
(3) By BoonDock on 2021-01-08 15:54:58 in reply to 2 [link] [source]
Ok, thanks for that.
The issue I have is that I downloaded the binary versions of php (ver 8) and SQLite. I would suggest that the downloads should then have different versions available for download if there is a requirement for different link libraries?
(4) By anonymous on 2021-01-09 20:01:03 in reply to 3 [source]
Well, Microsoft Visual C Runtime Library is just one of many possible standard C library implementations one could link with, and it has more than two versions. Covering the whole spectrum is a bit too much to ask for. Could you try to build your own sqlite3.dll? It's certainly doable; don't hesitate to ask if you get any problems.