note 43143 deleted from ref.mssql by cmb

From: Date: Sun, 18 Aug 2019 08:35:11 +0000
Subject: note 43143 deleted from ref.mssql by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211916@lists.php.net to get a copy of this message
Note Submitter: marcos1979ar at yahoo dot com dot ar ---- Red Hat 9.0 Freetds 0.62.3 Apache 2.0.49 PHP 5.0.ORC3 Instucction, that premit connect a server Linux with a server Windows 2000 Server with SQL Server. INSTALLING FREETDS 1-. Download freetds -> www.freetds.org 2-. tar -zxvf freetds-stable-tgz 3-. cd freetds-0.62.3 4-. ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld Note: tdsver=8.0 if you use SQL 2000, tdsver=7.0 if you use SQL 7.0 5-. make 6-. make install 7-. /usr/local/freetds/bin/tsql -S <ip of the server> -U <User SQL> Note: For default User SQL is sa and the it have not password For example: /usr/local/freetds/bin/tsql -S 198.168.100.2 -U sa 8-. Add the next text in freetds.conf ( /usr/local/freetds/etc ) [TDS] host = <ip of the Server with Sql> port = 1433 tds version = 8.0 Note: If you use SQL 2000 then tds version = 8.0 if you use SQL 7.0 then tds version = 7.0 9-. Add the next text in the file /etc/ld.so.conf /usr/local/freetds/lib INSTALLING APACHE 1-. Download apache www.apache.org 2-. tar -zxvf httpd-2.0.49.tar.gz 3-. cd httpd-2.0.49 4-. ./configure --prefix=/etc/httpd --enable-so 5-. make 6-. make install 7-. Configure the file -> httpd.conf ( /etc/httpd/conf/httpd.conf ) 8-. Probe the apache: /etc/httpd/bin/apachectl start /etc/httpd/bin/apachectl stop INSTALLING PHP 1-. Download the PHP in this site (www.php.net) 2-. tar -zxvf php-5.0-ORC3.tar.gz 3-. cd php-5.0-ORC3 4-. ./configure --with-apxs2=/etc/httpd/bin/apxs --enable-versioning --with-mssql=/usr/local/freetds --disable-libxml 5-. make 6-. make install 7-. cp php.ini-DIST /usr/local/lib 8-. Add the next line in /etc/httpd/conf/httpd.conf AddType application/x-httpd-php .php TESTING <html> <body> <?php $con = mssql_connect ("<ip of the server SQL>", "sa", ""); mssql_select_db ("<Data Base>", $con); $sql= "SELECT * FROM <Table>"; $rs= mssql_query ($sql, $con); echo "The field number one is: "; echo mssql_result ($rs, 0, 0); mssql_close ($con); ?> </body> </html>

« previous php.notes (#211916) next »