PHP Developer / Programmer (NYC)
Next Step Systems
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

SQLite Support for PHP4
There is a great misconception that SQLite is not available for PHP4, rather only for PHP5. In fact, SQLite support has been around for quite some time courtesy of the bindings available via the PHP Extension Community Library (PECL). This tutorial is intended to show you how to install the SQLite PECL Extension in PHP4. Following its installation I will walk through a basic example of using SQLite to access a database stored in a flat file.
So what is SQLite and what makes it so special? At their most basic level the vast majority of Database Engines (MySQL, Access, SQL Server, Postgres, etc) store their data as flat files on the file system. The application engine exists to allow for enhanced functionality such as user authentication, key management, etc. SQLite, however, does not represent your typical database, primarily because it lacks such an engine. Because of this it is unable to incorporate some of the advanced features found in high end database engines. Rather it is designed to be simple, easy to use, and capable of operating with decreased overhead making it especially useful for embedded systems.
For example, in PHP when you send a query to MySQL database it follows a client-server architecture where PHP talks to MySQL which then talks to its flat files. SQLite on the other hand is, itself, the server and therefore allows us to drop the middleman and have PHP talk directory to the files where the data is stored. Step 1: Acquire and install the software extension tarball from PECL.
This can be done either by visiting the PECL website (http://pecl.php.net), or using the PEAR Package Manager (pear download SQLite). Perhaps the simplest shortcut is to, from the command line, run 'pear install SQLite'. In this matter both the acquisition and installation of the extension are completed with one simple command.
Note: When I did this, I had to do explicitly create the copy path, listed at the end of the install process. If you encounter this problem be sure to see what directory the installer is attempting to copy to, create it, and run the installer again.
[ Next Page ]


Comments:
install problemRichard Hulbert07/19/05 12:08
RE: e-music studioKason05/02/05 14:35
answersjfarrell04/20/05 12:48
help pleaseted01/09/05 22:07
sqlite3Praveen Kumar B N12/17/04 01:24
i can not call a php code in javascripthabtamu yihidego11/26/04 10:30
e-music studiovijay11/21/04 23:32
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.