Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - Programming » PHP support » SQL Anywhere PHP extension » How to build the SQL Anywhere PHP extension on Unix and Mac OS X


Adding the SQL Anywhere PHP extension files to the PHP source tree

  1. Download the SQL Anywhere PHP extension source code from [external link] Look for the section entitled Building the Driver from Source.

  2. From the directory where you saved the SQL Anywhere PHP extension, extract the files to the ext subdirectory of the PHP source tree (Mac OS X users should replace tar with gnutar):

    $ tar -xzf -C PHP-source-directory/ext/

    For example:

    $ tar -xzf sqlanywhere_php-1.0.8.tar.gz -C ~/php-5.2.11/ext
  3. Make PHP aware of the extension:

    $ cd PHP-source-directory/ext/sqlanywhere
    $ touch *
    $ cd ~/PHP-source-directory
    $ ./buildconf

    The following example is for PHP version 5.2.11. You must change php-5.2.11 below to the version of PHP you are using.

    $ cd ~/php-5.2.11/ext/sqlanywhere
    $ touch *
    $ cd ~/php-5.2.11
    $ ./buildconf
  4. Verify that PHP is aware of the extension:

    $ ./configure -help | egrep sqlanywhere

    If you were successful in making PHP aware of the SQL Anywhere extension, you should see the following text:


    If you are unsuccessful, keep track of the output of this command and post it to the SQL Anywhere Forum at [external link] for assistance.