Testing the PHP Extension

Perform a quick check to verify that the SAP Sybase IQ PHP extension is working correctly.

Prerequisites

All of the required PHP components should be installed on your system

Task
  1. Make sure that the bin32 subdirectory of your SAP Sybase IQ installation is in your path. The SAP Sybase IQ PHP extension requires the bin32 directory to be in your path.
  2. At a command prompt, run the following command to start the SAP Sybase IQ sample database.
    cd "%ALLUSERSPROFILE%"\SybaseIQ\demo
    start_iq @iqdemo.cfg iqdemo.db

    The command starts a database server using the sample database.

  3. At a command prompt, change to the SDK\PHP\Examples subdirectory of your SAP Sybase IQ installation. Make sure that the php executable directory is included in your path. Enter the following command:
    php test.php

    Messages similar to the following should appear. If the PHP command is not recognized, verify that PHP is in your path.

    Installation successful
    Using php-5.2.11_sqlanywhere.dll
    Connected successfully

    If the SAP Sybase IQ PHP extension does not load, you can use the command "php -i" for helpful information about your PHP setup. Search for extension_dir and sqlanywhere in the output from this command.

  4. When you are done, stop the SAP Sybase IQ database server by clicking Shut Down in the database server messages window.

The tests should succeed, indicating that the SAP Sybase IQ PHP extension is working correctly.