This is an extension for the SQLite Embeddable SQL Database Engine. SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process.
SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk.
PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.
The packaging and distribution system used by PECL is shared with its sister, PEAR
PEAR - PHP Extension and Application Repository
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver that implements the PDO interface can expose database-specific features as regular extension functions. Note that you cannot perform any database functions using the PDO extension by itself; you must use a database-specific PDO driver to access a database server.
PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.
PDO ships with PHP 5.1, and is available as a PECL extension for PHP 5.0; PDO requires the new OO features in the core of PHP 5, and so will not run with earlier versions of PHP.
------
(gcc is required and may have to be installed)
tar xvf php-your.version.here.tar.gz
cd php-your.version.here/ext/sqlite/
phpize
./configure
make
make install
- create file /etc/php.d/sqlite.ini:
; Enable sqlite extension module
extension=pdo.so
extension=sqlite.so
extension=pdo_sqlite.so
- [restart apache] service httpd restart
- search phpinfo(); for 'sqlite' to verify correct installation\
phpize 命令是用來準備 PHP 外掛模組的編譯環境的。下面例子中,外掛模組的源程序位於 extname 目錄中:
$ cd extname
$ phpize
$ ./configure (註一)
$ make
$ make install
成功的安裝將建立 extname.so 並放置於 PHP 的外掛模組目錄中 (預設存放於 /usr/lib/php/modules/ 內) 。
需要調整 php.ini,加入 extension=extname.so 這一行之後才能使用此外掛模組。
./configure –with-php-config=/usr/bin/php-config
--with-php-config=[Insert path to proper php-config here]
For example (my case):
./configure --with-php-config=/usr/local/php5/bin/php-config5