Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 uid=1(daemon) gid=1(daemon) grupos=1(daemon) Safe-mode: OFF (not secure) /opt/lampp/share/doc/freetds-0.91/userguide/ drwxr-xr-x |
Viewing file: Select action/file-type:
PHPThere are three options for building PHP with support for FreeTDS corresponding to the three APIs that FreeTDS supports: DB-Library, CT-Library, and ODBC.
DB-LibraryPHP can be configured with DB-Library access for a "Sybase" server (which also works with Microsoft servers), or with the mssql extension, intended exclusively for Microsoft servers. Example 7-6. PHP and DB-Library for "Sybase" First build FreeTDS normally. $ ./configure --prefix=/usr/local/freetds $ make $ su root Password: $ make install Then build PHP with support for "Sybase" $ cd php $ ./configure --with-sybase=/usr/local/freetds $ make $ su root Password: $ make install And that's it! CT-LibraryOption 2 is to use the CT-Library API. Again here, we run into minor difficulties at build time. Applications linking with Sybase's OpenClient have to link in a handful of libraries and these libraries vary slightly from platform to platform. When creating FreeTDS it was decided that there would be only one library: libct. This saves a great deal of library naming conflicts that Sybase ran into (e.g. libtcl is used both by Sybase and the language TCL), however some applications like PHP assume that all the Sybase libraries will be present. So, some hand editing of the Makefile is necessary to remove these extra libs. Build FreeTDS just as you would for DB-Library in with DB-Library, above. Then configure PHP with CT-Library. $ cd php $ ./configure --with-sybase-ct=/usr/local/freetdsNow edit the Zend/Makefile looking for the libZend_la_LDFLAGS line and remove -lsybtcl -lintl -lcomn and -lcs, leaving the -lct. Then proceed to make and install PHP. $ make $ su root Password: $ make installWe hope an upcoming version of PHP will automatically detect the presence of FreeTDS and include only the -lct library. ODBCThe third and newest option is to use the FreeTDS ODBC driver with PHP. First build the iODBC or unixODBC driver manager and FreeTDS as detailed in Preparing ODBC. Then build PHP with support for ODBC. $ cd php $ ./configure --with-iodbc=/usr/local $ make $ su root Password: $ make installNow everything should run. There is a sample PHP script in the FreeTDS samples directory called odbctest.php. |
:: Command execute :: | |
--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.9651 ]-- |