Running Sample Script for PHP

Run the sample script for the SAP Adaptive Server Enterprise extension module for PHP.

  1. Locate PHP samples in $SYBASE/$SYBASE_OCS/samples/php.
  2. Verify that SAP Adaptive Server is up and running.
  3. Generate a sample php.ini file by executing:

    $SYBASE/$SYBASE_OCS/config/generate_php_ini.sh.

  4. Ensure these environment variables are set:
    • SYBASE

    • SYBASE_OCS

    • LD_LIBRARY_PATH – specifies the $SYBASE/$SYBASE_OCS/lib directory.

  5. Run the sample:
    php -c $SYBASE/$SYBASE_OCS/config firstapp.php

    or, to obtain a list of loaded extensions, excute:

    php -c $SYBASE/$SYBASE_OCS/config -m

See the Adaptive Server Enterprise Extension Module for PHP Programmers Guide.