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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Programming » Database and application deployment » Requirements for deploying client applications » PHP client deployment

 

Installing the PHP extension on Windows

Copy the PHP extension DLL from the SQL Anywhere installation directory and add it to your PHP installation to use the SQL Anywhere PHP extension on Windows. Optionally, add an entry to your PHP initialization file to load the extension so it does not need to load manually in each script.

Prerequisites

You must have PHP 5.0 or later installed.

 Task
  1. Locate the php.ini file for your PHP installation, and open it in a text editor.

  2. Locate the line that specifies the location of the extension_dir entry.

  3. If the entry does not exist, it is recommended that you create the extension_dir entry and point it to an isolated directory for better system security.

  4. Copy one of the php-5.x.y_sqlanywhere.dll files from the Bin32 subdirectory of your SQL Anywhere installation to the directory specified by the extension_dir entry in the php.ini file.

    Note

    The string 5.x.y is the PHP version number corresponding to the version that you have installed.

    If your version of PHP is more recent than the SQL Anywhere PHP extensions provided by SQL Anywhere, try using the most recent extension provided. A version 5.2.x SQL Anywhere PHP extension will not work with a version 5.3.x PHP.

  5. Add the following line to the Dynamic Extensions section of the php.ini file to load the SQL Anywhere PHP driver automatically. Without this step, the PHP driver needs to be loaded manually every time the script requires it.

    Copy the following entry:

    extension=php-5.x.y_sqlanywhere.dll

    5.x.y represents the version number of the SQL Anywhere PHP extension copied in the previous step.

  6. Save and close php.ini.

  7. Ensure that the Bin32 subdirectory of your SQL Anywhere installation is in your path.

Results

The SQL Anywhere PHP extension is supported on your Windows environment and ready for use.

 See also