Create this PHP script (I created it as sqlSandbox.php in the top-level of my web-server's web root directory)
<?php
// Give yourself all the debugging info you can
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', TRUE);
// What version of PHP is running?
echo "phpversion " . phpversion();
echo "<br>";
// Everything and the Kitchen sink
phpinfo();
?>
Things to check on this page:
A) Top section
Loaded Configuration File | M:\php-5.5.10\php.ini |
B) In the PDO section
You should see
PDO support | enabled |
---|---|
PDO drivers | sqlite |
C) There should be a pdo_sqlite section.
PDO Driver for SQLite 3.x | enabled |
---|---|
SQLite Library | 3.7.7.1 |
D) There should be a sqlite3 section
SQLite3 support | enabled |
---|---|
SQLite3 module version | 0.7-dev |
SQLite Library | 3.7.7.1 |
Directive | Local Value | Master Value |
---|---|---|
sqlite3.extension_dir | M:\sqlite3 | M:\sqlite3 |
2) Note that any function in the PHP manual beginning "sqlite_" refers to sqlite2 and below, and that only references beginning with SQLite3 work with SQLite3.
3) Make sure you have a php.ini file in your php directory
(I created mine by copying php-production.ini to php.ini)
4) Make sure PHP can see the PHP Windows extensions
In php.ini
Uncomment the last line of this section, (by removing the ; at the start of the line) and add the ext sub-directory
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
; extension_dir =
So the final line becomes:
extension_dir = ext
5) Enable the PDO Windows extension for SQLite
In php.ini
Uncomment this line (by removing the ; at the start of the line)
to get
extension=php_pdo_sqlite.dll
6) Enable the SQLite3 Windows extension
In php.ini
Uncomment this line (by removing the ; at the start of the line)
to get
extension=php_sqlite3.dll
7) Tell PHP where SQLite is.
Uncomment this line (by removing the ; at the start of the line) and put in the relevant directory
[sqlite3]
sqlite3.extension_dir = M:\sqlite3
No comments:
Post a Comment