PHP 4.0 Bug #6840 Updated: echo and print stops outputting after getting an NULL (from an oci8 query)
| From: | Bug Database | Date: | Mon, 25 Sep 2000 22:56:44 +0000 |
| Subject: | PHP 4.0 Bug #6840 Updated: echo and print stops outputting after getting an NULL (from an oci8 query) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33665@lists.php.net to get a copy of this message | ||
ID: 6840
Updated by: stas
Reported By: anders@gatefive.fi
Status: Feedback
Bug Type: *Function Specific
Assigned To:
Comments:
Is this reproduceable without Oracle involved? If yes, please provide short reproducing script...
Previous Comments:
---------------------------------------------------------------------------
[2000-09-21 20:59:05] anders@gatefive.fi
/*
After searching for an error for hours I came to the conclusion it is in
echo *and* print, but not in printf. Also, a flush(); will help somewhat after
the problematic echo line > echo(sprintf(", %s(%s) = %s(%s)", ...); flush();
allthough everything after the 4th %s will be gone., 4th being most likely
a string being null */
/* Form here OK all way to: */
include("forms/header"); // HTML head & title & meta & body tags
OCIInternalDebug(1);
$conn = OCIPLogon(SQL_USER, SQL_PASS, SQL_HOST);
$sql_str = "select * from kaupungit";
if (!$conn) {
echo "Error connection, exiting";
exit;
}
$result = OCIParse($conn, $sql_str);
echo_d("<!-- sql_str: $sql_str, q: $result -->n");
$success = OCIExecute($result, OCI_COMMIT_ON_SUCCESS);
// $success = 1;
if ($success) {
// $numrows = OCIFetchStatement($result, &$row);
// OCIFetchInto($result,&$row,OCI_ASSOC+OCI_RETURN_NULLS);
OCIFetchInto($result,&$row);
// OCIFetch($result);
$err = OCIError($result);
if (is_array($err))
echo($err['code']."=".$err['message']."<br>n");
echo("YEAH(type=".gettype($row));
if (isset($numrows))
echo(", rows=$numrows");
if (is_array($row)) {
while (list($key, $val) = each($row)) {
/* here.. line below stops all output, was tried with sprintf and without */
echo(sprintf(", %s(%s) = %s(%s)",
gettype($key), $key,
gettype($val), $val)); /* Specificly the value of $val breaks echo */
if (is_array($val)) {
echo("(".count($val).")");
echo("[".$val[0]."]");
while (list($key2, $val2) = each($val)) {
echo("<br>-->$key2=$val2");
}
}
}
}
echo(")<br>n");
} else {
echo("PUKE<br>n");
}
/* !!!! the HTML text included below *will* be displayed */
include("forms/footer");
compiletime options:
./configure
--with-config-file-path=/etc/httpd
--enable-sigchild
--with-gnu-ld
--enable-yp
--with-swf=/usr/local/lib/swf
--with-snmp
--enable-ftp
--enable-calendar
--with-pgsql=/usr/lib/pgsql
--with-mysql=yes
--enable-safe-mode
--enable-sysvsem
--enable-sysvshm
--enable-track-vars
--enable-magic-quotes
--enable-memory-limit
--enable-debugger
--enable-bcmath
--with-zlib=yes
--with-ttf
--with-ldap=yes
--with-xml
--with-gd=yes
--with-yp
--with-jpeg-dir
--with-tiff-dir
--with-config-file-path=/etc/httpd
--with-apxs=/usr/sbin/apxs
--with-exec-dir=/usr/lib/apache/bin
--enable-bcmath
--enable-dbase
--enable-filepro
--with-mcrypt=/usr/local
--with-oracle
--with-xpm-dir=/usr/X11R6
--with-oci8
--with-curl
--with-imap=yes
--with-mhash
--enable-versioning
--with-t1lib
Oracle 8.0.5 is on a Windows NT machine.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6840