SQLite DLL on Windows with PHP
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?
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.
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?
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.