Compiling PHP as a CGI Executable

If you are using a web server that is not supported by PHP, or to execute PHP scripts in a command shell rather than on a web page, you should compile PHP as a CGI executable.

Prerequisites

There are no prerequisites for this task.

Task
  1. Make sure the environment is set up for SAP Sybase IQ.

    Depending on which shell you are using, enter the appropriate command from the directory where SAP Sybase IQ is installed.

    If you are using this shell... ...use this command
    sh, ksh, bash
    ../IQ_16.sh
    csh, tcsh
    ./IQ_16.csh
  2. Configure PHP as a CGI executable and with the SAP Sybase IQ PHP extension.

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

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

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

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

    The configuration script will try to determine the version and location of your SAP Sybase IQ installation.

  3. Compile the executable:
    $ make
  4. Install the components.
    $ make install

PHP is successfully compiled as a CGI executable.