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.
Prérequis
There are no prerequisites for this task.
Make sure the environment is set up for SQL Anywhere.
Depending on which shell you are using, enter the appropriate command from the directory where SQL Anywhere is installed (by default, this is /opt/sqlanywhere16). On Mac OS X, the default directory is /Applications/SQLAnywhere16/System.
If you are using this shell... | ...use this command | ||
---|---|---|---|
sh, ksh, bash |
|
||
csh, tcsh |
|
Configure PHP as a CGI executable and with the SQL Anywhere 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 SQL Anywhere installation. If you examine the output of this command, you should see lines similar to the following:
checking for SQL Anywhere support... yes checking SQL Anywhere install dir... /opt/sqlanywhere16 checking SQL Anywhere version... 16 |
Compile the executable:
$ make |
Install the components.
$ make install |
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |