#23319 [NEW]: Problem FreeTds 0.61 with DB Pear
| From: | cristianoarnold at yahoo dot com dot br | Date: | Wed, 23 Apr 2003 17:44:12 +0000 |
| Subject: | #23319 [NEW]: Problem FreeTds 0.61 with DB Pear | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-15395@lists.php.net to get a copy of this message | ||
From: cristianoarnold at yahoo dot com dot br
Operating system: Suse UnitedLinux 1.0
PHP version: 4.3.2RC1
PHP Bug Type: PEAR related
Bug description: Problem FreeTds 0.61 with DB Pear
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 bug report at http://bugs.php.net/?id=23319&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23319&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23319&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23319&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23319&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23319&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23319&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23319&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23319&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23319&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23319&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23319&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23319&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23319&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23319&r=gnused