PHP 4.0 Bug #5351: problem in accessing MSSql Server via Sybase DB lib
| From: | zilong99 at 263 dot net | Date: | Tue, 04 Jul 2000 03:25:18 +0000 |
| Subject: | PHP 4.0 Bug #5351: problem in accessing MSSql Server via Sybase DB lib | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-23262@lists.php.net to get a copy of this message | ||
From: zilong99@263.net
Operating system: Redhat6.0
PHP version: 4.0.1
PHP Bug Type: Sybase (dblib) related
Bug description: problem in accessing MSSql Server via Sybase DB lib
i meet problems when i access MSSql Server via Sybase DB lib in php4(Redhat6.0)
(1) i install oracle 8.1.5i,Sybase Adaptive Server Enterprise(ASE)11.9.2, openldap1.2.7
(2) php4.0.0(or php4.0.1) and apache 1.3.12
(3) i configure php4 as following:
./configure \
--with-apache=/usr/local/apache \
--with-ldap=/usr/local/openldap \
--with-sybase=/opt/sybase \
--with-config-file-path=/usr/local/lib \
--enable-track-vars \
--disable-debug
(4)build success
(5)i select data from mssql server and there isn't problem
but i meet problem in processing return data.
Please take a look at the following php scripts:
---------------------------------------------------------
<?
include "sybase.inc";
$db = new DB_Sql;
$db->query("select name, email from temp");
## it run correctly
while($db->next_record()) {
echo "<br>".$db->f(0).", ".$db->f(1);
}
?>
--------------------------------------------------------
<?
include "sybase.inc";
function cp(&$dst, $src) {
$dst = $src;
}
$db = new DB_Sql;
$db->query("select * from temp");
## it run correctly
while($db->next_record()) {
cp($a, $db->f(0));
cp($b, $db->f(1));
echo "<br>".$a.", ".$b;
}
?>
-------------------------------------------------
<?
include "sybase.inc";
$db = new DB_Sql;
$db->query("select * from temp");
## if return more than 2 records it make php crash
while($db->next_record()) {
$a = $db->f(0);
$b = $db->f(1);
echo "<br>".$a.", ".$b;
}
?>
-----------------------------------------------------
<?
include "sybase.inc";
$db = new DB_Sql;
$db->query("select * from temp");
## if return more than 2 records it make php crash
while($db->next_record()) {
$tmp = "";
echo "<br>".$db->f(0).", ".$db->f(1);
}
?>
------------------------------------------------------
There is also another problem:
if you use $GLOBAL array in your php script, sometimes it make php crash.