Until you have done this, you will not be able to access an ODBC data source from PEAR DB.ĭownload ODBC Drivers for Oracle®, SQL Server, Salesforce, MongoDB, Access, Derby, InterBase, MySQL & DB2. Skip the sections in the tutorial that relate to Apache.Īfter you have completed the Enabling ODBC support in PHP under Apache tutorial, you will have the necessary prerequisite software for the PEAR DB ODBC database driver. Note that if you want to use PHP as a standalone program rather than an Apache module, the tutorial is still relevant. The tutorial describes how to install, configure and test Apache, PHP, the PHP ODBC extension and an Easysoft ODBC Driver. The Easysoft tutorial Enabling ODBC support in PHP under Apache contains installation instructions for the software you need to install before using the PEAR ODBC driver. Installing PHP, Unified ODBC and Easysoft ODBC Drivers To use PEAR DB’s ODBC driver, you need the PHP ODBC extension ( Unified ODBC). PEAR DB layers itself on top of PHP’s existing database extensions.PEAR DB is compatible with PHP 4 (version 4.0.4 or later) and PHP 5 but not PHP 3.However, Easysoft ODBC drivers should work with PHP/PEAR DB on any recent Linux distribution (CentOS, Fedora, Mandrake, SUSE and so on). PHP 5.2.3 and PEAR DB 1.80 on Ubuntu (Edgy Eft, Feisty Fawn, Gutsy Gibbon and Hardy Heron).PEAR DB and LinuxĮasysoft ODBC drivers have been tested with: The PEAR DB structure insulates your PHP applications and scripts from database-specific details letting you switch from one database to another without having to change your PHP code. The default data access methods in common.php are overridden as necessary by the drivers. In the case of PEAR DB’s ODBC driver, the underlying database extension is Unified ODBC.Ĭode shared by the drivers is stored in DB/common.php. The lower level driver files translate between the top-level abstract interface and the database-specific extensions that DB layers itself on top of. The top level, DB.php, provides a database independent interface for interacting with databases. If you want to access your database through ODBC, you need to use PEAR DB rather than PEAR MDB2 therefore. However, it is not currently possible to access a database from PEAR MDB2 through ODBC (see PEAR :: Request #8413 :: ODBC driver). Note Pear DB has been superceded by Pear MDB2, which is a merge of the DB and Metabase PHP database abstraction layers. You can then access remote database such as Microsoft SQL Server, Oracle®, Microsoft Access, Sybase ASE and InterBase from PEAR DB on Linux and Unix. This tutorial shows how to use PEAR DB with an ODBC driver, which you can download from this site. The PEAR DB module’s ODBC backend lets you access databases for which an ODBC driver is available. DB provides portability features that enable programs written for one database to work with other databases. One of its most popular packages is PEAR DB, the database abstraction layer created by this project. PEAR (PHP Extension and Application Repository) is a framework and distribution system for reusable PHP classes, libraries and modules. To connect Microsoft Access or any other remote ODBC database to PHP/Pear DB, use PEAR DB with the ODBC-ODBC Bridge. To access Oracle® from PHP/Pear DB, use PEAR DB with the Oracle® ODBC Driver. Use our drivers to connect PHP/PEAR DB to SQL Server 2000-2019 and SQL Server Express. To access Microsoft SQL Server from PHP/PEAR DB running on Unix or Linux, use PEAR DB with the SQL Server ODBC Driver or ODBC-ODBC Bridge (OOB).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |