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

SQL Anywhere 12.0.0 (Français) » SQL Anywhere Server - Programming » Deploying databases and applications » Deploying client applications » Deploying PHP clients

 

Installing the PHP extension on Windows

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

 ♦  To install the PHP extension on Windows
  1. Locate the php.ini file for your PHP installation, and open it in a text editor. Locate the line that specifies the location of the extension_dir directory. If extension_dir is not set to any specific directory, it is a good idea to set it to point to an isolated directory for better system security.

  2. Copy the file php-5.x.y_sqlanywhere.dll 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. Note that a version 5.2.x SQL Anywhere PHP extension will not work with a version 5.3.x PHP.

  3. Add the following line to the Dynamic Extensions section of the php.ini file to load the SQL Anywhere PHP driver automatically.

    extension=php-5.x.y_sqlanywhere.dll

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

    Save and close php.ini.

    An alternative to automatically loading the PHP driver is to load it manually in each script that requires it. See Configuring the SQL Anywhere PHP extension.

  4. Make sure that the Bin32 subdirectory of your SQL Anywhere installation is in your path. The SQL Anywhere PHP extension DLL requires the Bin32 directory to be in your path.

For more information, see Running PHP test scripts in your web pages.