|
|
ODBTP -- Installation
Unpacking the Distribution Files
Win32 Service Installation
Client Library Installation (UNIX)
Client Library Installation (Win32)
PHP Extension Installation (UNIX-Static)
PHP Extension Installation (UNIX-Shared)
PHP Extension Installation (Win32)
Installing PHP Extension with MSSQL Support
- Download the odbtp-1.1.tar.gz file.
- Run
zcat odbtp-1.1.tar.gz | tar xf -
NOTE: The ODBTP service can only be installed on Windows NT 4.0, 2000 or XP Pro.
- Create a directory on the Windows host where the service program files will reside, i.e.,
md odbtp .
- Copy the files
odbtpctl.exe , odbtpsrv.exe and odbtpsrv.ini files from the winservice directory into the directory created in step 1.
- Open a command prompt (cmd) window on the Windows host.
- Change to the directory to which the service program files were copied, i.e.,
cd odbtp .
- Run the following commands to install and start the service:
odbtpctl install
odbtpctl start
- Run
configure --help to view available configuration options.
configure [options]
make
make install
NOTE: Installing the client library on a Win32 platform requires MS Visual C++ 6.0 or later.
- Open a Windows Explorer window and go to the folder containing the ODBTP distribution files.
- Double-click on the
libodbtp.dsw file.
- Use the
Build | Set Active Configuration menu option to select the libodbtp - Win32 Release project configuration.
- Use the
Build | Build menu option to build the project.
- Copy
odbtp.h to an "include" directory that can be accessed by projects that will be built with the ODBTP client library.
- Copy
libodbtp.lib from Release to a "lib" directory that can be accessed by projects that will be built with the ODBTP client library.
NOTE: The ODBTP client library must be installed before installing the static version of the ODBTP PHP extension.
- Copy the directory
odbtp and all its contents from php/ext into <php source distribution directory>/ext .
- Change to the PHP source distribution directory.
- Run the command
buildconf to rebuild the configure script.
- Run
configure --with-odbtp {other configure options] .
- Run
make and then make install .
- Change to the directory
php/ext .
- Open the file
Makefile in an editor, such as vi , and change the value of PHP_INCROOT , if necessary.
- Run
make .
- Copy the file
php_odbtp.so to a location where it can be loaded in a PHP script with the dl() function.
NOTE: The Win32 version of the ODBTP PHP extension was built under PHP 4.3.1, and may not work with prior versions of PHP.
- Copy the file
php_odbtp.dll from php/win32ext into the directory where the other Win32 PHP extensions are located.
- Edit the
php.ini file and add the line extension=php_odbtp.dll where the other Win32 extensions are specified.
- Restart the web server used with PHP so that the extension can be loaded.
The following provides information on how to install the ODBTP PHP extension
with support for all of the functions from PHP's native MSSQL extension.
For UNIX-static installation, use --with-odbtp-mssql instead of
--with-odbtp .
For UNIX-shared installation, uncomment the line that includes
-DODBTP_MSSQL among the settings for MODULE_CFLAGS
in the Makefile .
For Win32 installations, use php_odbtp_mssql.dll instead of
php_odbtp.dll .
|