|
|
ODBTP -- Installation
The ODBTP client/server package requires the installation of a Win32
service, and a C client library. While the service can only be installed
on a Win32 host, the client library can be installed on both non-Win32
and Win32 hosts.
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)
PHP Extension Installation (NetWare)
Installing PHP Extension with MSSQL Support
- Download the odbtp-1.1.4.tar.gz file.
- Run
zcat odbtp-1.1.4.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: Building the client library on a Win32 platform requires
MS Visual C++ 6.0 or later. ODBTP 1.1.1 and later includes a
Win32 binary build of the client library, and thus is no longer required.
- 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.4.1,
PHP 5.0.5 and PHP 5.1.1. They may not work with other versions of PHP.
- Copy the file
php_odbtp.dll from the applicable php-x.x.x directory under php/bin_win32 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.
NOTE: The NetWare version of the ODBTP PHP extension was built under PHP 4.2.3 and PHP 5.0.4 which are the
versions currently shipped with NetWare, and will not work with other versions of PHP4 and PHP5.
- Copy the file
php_odbtp.nlm from the applicable php-x.x.x directory under php/bin_netware into the directory where the other NetWare PHP extensions are located;
usually this is sys:/php4/ext , or sys:/php5/ext .
- Edit the
php.ini file and add the line extension=php_odbtp.nlm where the other NetWare 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 .
For NetWare installations, use php_odbtp_mssql.nlw instead of
php_odbtp.nlw .
|