Introduction to the SQL Anywhere PHP module

PHP, which stands for Hypertext Preprocessor, is an open source scripting language. Although it can be used as a general-purpose scripting language, it was designed to be a convenient language in which to write scripts that could be embedded with HTML documents. Unlike scripts written in JavaScript, which are frequently executed by the client, PHP scripts are processed by the web server, and the resulting HTML output sent to the clients. The syntax of PHP is derived from that of other popular languages, such as Java and Perl.

To make it a convenient language in which to develop dynamic web pages, PHP provides the ability to retrieve information from many popular databases, such as SQL Anywhere. Included with SQL Anywhere are two modules that provide access to SQL Anywhere databases from PHP. You can use these modules and the PHP language to write stand-alone scripts and create dynamic web pages that rely on information stored in SQL Anywhere databases.

Prebuilt versions of the PHP modules are provided for Windows, Linux, and Solaris and are installed in the operating-system-specific binaries subdirectories of your SQL Anywhere installation. Source code for the SQLAnywhere PHP module is installed in the SDK\PHP subdirectory of your SQL Anywhere installation.

Requirements

Before you can use the SQL Anywhere PHP module, you must also install the following components:

  • The PHP 5 binaries for your platform, which can be downloaded from [external link] http://www.php.net.
  • A web server, if you want to run PHP scripts within a web server. SQL Anywhere can be run on the same computer as the web server, or on a different computer.
  • For Windows, the SQL Anywhere client software dblib11.dll and dbcapi.dll.
  • For Linux/Unix, the SQL Anywhere client software libdblib11.so and libdbcapi.so.
  • For Mac OS X, the SQL Anywhere client software libdblib11.dylib and libdbapi.dylib.

The following sections provide assistance with installing the SQL Anywhere PHP module.