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

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere PHP API » Building the SQL Anywhere PHP module on Unix and Mac OS X » Compiling Apache and PHP

 

Compiling PHP as a CGI executable

To compile PHP as a CGI executable
  1. Make sure the environment is set up for SQL Anywhere.

    For instructions on setting up the environment for SQL Anywhere, follow the instructions in step 4 of Compiling PHP as an Apache module.

  2. Configure PHP as a CGI executable and with the SQL Anywhere PHP module.

    Execute the following command from the directory where your PHP files were extracted:

    $ cd PHP-source-directory
    $ ./configure --with-sqlanywhere

    For example:

    $ cd ~/php-5.2.6/
    $ ./configure --with-sqlanywhere

    The configuration script will try to determine the version and location of your SQL Anywhere installation. If you examine the output of this command, you should see lines similar to the following:

    checking for SQL Anywhere support... yes
    checking     SQL Anywhere install dir... /opt/sqlanywhere10
    checking     SQL Anywhere version... 9
  3. Compile the executable:

    $ make
  4. Install the components.

    $ make install

For information about testing and using PHP, see Running PHP test scripts in your web pages.