php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5351 problem in accessing MSSql Server via Sybase DB lib
Submitted: 2000-07-04 05:25 UTC Modified: 2000-08-01 23:12 UTC
From: zilong99 at 263 dot net Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.0.1 OS: Redhat6.0
Private report: No CVE-ID: None
 [2000-07-04 05:25 UTC] zilong99 at 263 dot net
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-05 01:46 UTC] joey at cvs dot php dot net
Can you try the lastest CVS? There were recently fixes to the DB-Lib.
As an alternative, try CT-Lib instead. All mssql stuff should be using
CT-Lib anyways.
 [2000-08-01 23:12 UTC] waldschrott@php.net
Please verify that it?s still happening using the latest version of PHP (release 4.0.1pl2 or CVS).
 [2000-08-01 23:12 UTC] waldschrott@php.net
it should read: no feedback, closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC