#23319 [Opn->Asn]: Problem FreeTds 0.61 with DB Pear

From: Date: Mon, 28 Apr 2003 09:10:25 +0000
Subject: #23319 [Opn->Asn]: Problem FreeTds 0.61 with DB Pear
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15674@lists.php.net to get a copy of this message
ID: 23319 Updated by: arnaud@php.net Reported By: cristianoarnold at yahoo dot com dot br -Status: Open +Status: Assigned Bug Type: PEAR related Operating System: Suse UnitedLinux 1.0 PHP Version: 4.3.2RC1 -Assigned To: +Assigned To: lsmith New Comment: Is it for you lukas ? Previous Comments: ------------------------------------------------------------------------ [2003-04-23 12:44:11] cristianoarnold at yahoo dot com dot br Hi I have installed apache-ssl 1.3.27 with Php 4.3 with Classes DB Pear 1.3 and Client Sybase 11.9.2 in the Suse UnitedLinux 1.0 to connect in the Sybase ASE 11.9.2 . I work very well. Now, I removed the client sybase and installed FreeTds 0.61, because I want to connect in the MsSql 2000 and Sybase Ase 11.9.2 of the same web server. MsSql 2000 When I change the configuration of the my web pages to connect in the MsSql using DB Pear, all work well, except the function is_null that it returns a wrong result. The test IF that are returns a wrong result is: In the table USER from database MsSql exists one column called "DateThatBlockedThePassword" that have value NULL to user 'adminitrator' and the date '04/15/2003' to user 'operator' The test in my php web page is: <? ... $dsn = "mssql=db_user:my_password@sql_server/databasetest"; $db_conn = DB:connect( $dsn ); $sql = select UserCode, DateThatBlockedThePassword] from USER where LoginName = $_POST["LoginName"]; $if( DB:isError( $query_user = $db_conn->query( $sql ) { echo "Failed"; exit( $query_user->getMessage() ); } $array_user = $query_user->fetchRow( DB_FETCH_MODE_ASSOC ); if ( is_null ( $array_user[ DateThatBlockedThePassword] ) ) { ..."execute others query , etc" } ... ?> This result is returning FALSE to both the users ; When I remove this test, the script work correctly. To Sybase When I change the configuration of the my web pages to connect in the Sybase using DB Pear, occur a other error. <? ... $dsn = "sybase=db_user:my_password@sybase_server/databasetest"; $db_conn = DB:connect( $dsn ); $sql = select UserCode, LoginName, UserPassword from USER where LoginName = $_POST["LoginName"]; $if( DB:isError( $query_user = $db_conn->query( $sql ) { exit( $query_user->getMessage() ); } ... ?> Return the message Warning: Sybase message: Changed database context to 'databasetest'. (severity 10) in /usr/local/php/lib/php/DB/sybase.php on line 68 DB Error: DB backend not capable select UserCode, LoginName, UserPassword from USER where LoginName = 'administrator' Obs. The db_user that is used to connect in the Sybase ASE have default database configured to 'databasetest' Procedures from the Instalation to: --FreeTds-- ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-sybase-compat --enable-msdblib make && make install export SYBASE=/usr/local/freetds export LD_LIBRARY_PATH=$SYBASE/lib export PATH=$PATH:$SYBASE/bin interface file in /usr/local/freetds/interfaces have: sql_server query tcp 8.0 192.168.1.10 1433 sybase_server query tcp 5.0 192.168.1.100 4100 master tcp 5.0 192.168.1.100 4100 --PHP-- ./configure --prefix=/usr/local/php --with-apache=../apache-1.3.27 --with-sybase=/usr/local/freetds with-pgsql=/usr/local/pgsql --with-openssl=/usr/local --with-mcrypt=/usr/local make && make install php.ini have [Sybase] sybase.min_message_severity = 11 sybase.min_server_severity = 11 sybase.interface_file = /usr/local/freetds/interfaces [MSSQL] sybase.min_message_severity = 10 sybase.min_server_severity = 10 ---Apache-- ./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a make && make install What it can be wrong. That is an FreeTds bug? Obs. I have same web pages in the IIS 5.0 web server with Windows 2000, client native to ( MsSql 2000 and Sybase ASE 11.9.2) , PHP 4.3 with classes DB Pear and it work well. Best Regards ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23319&edit=1

« previous php.pear.dev (#15674) next »