Second, the steps demonstrated create the data that will serve as the basis for all
subsequent examples in this chapter.
Installing SQLite
When PHP 5.0 was released, support for SQLite was added and the extension was
enabled by default. Therefore, if you??™re running PHP 5.X, you can begin using SQLite
without performing any additional steps.
As of PHP 5.1 this changed in two ways: while the extension continues to be bundled
with the language, it is left to the user to decide whether it will be enabled. Further, as
of PHP 5.1, SQLite support is handled through the PDO extension (introduced in
Chapter 31). Therefore if you??™re running PHP 5.1 or greater, you??™ll need to add the
following two lines to the php.ini file in this order:
extension=php_pdo.dll
extension=php_sqlite.dll
There is one related utility omitted from the PHP distribution, namely sqlite, a
command-line interface to the engine. Because this utility is quite useful (although not
necessary), consider installing the SQLite library from http://www.sqlite.org/, which
includes this utility. Then configure (or reconfigure) PHP with the --with-sqlite=/
path/to/library flag. The next section shows you how to use this interface.
Windows users will need to download the SQLite extension from http://
snaps.php.net/win32/PECL_STABLE/php_sqlite.dll. Once downloaded, place this
DLL file within the same directory as the others (PHP-INSTALL-DIR\ext) and add the
following line to your php.
Pages:
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652