#20359 [Fbk->Opn]: php returns garbage when no rows selected

From: Date: Tue, 12 Nov 2002 07:37:08 +0000
Subject: #20359 [Fbk->Opn]: php returns garbage when no rows selected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-24667@lists.php.net to get a copy of this message
ID: 20359 User updated by: pinned@spic.ru Reported By: pinned@spic.ru -Status: Feedback +Status: Open Bug Type: OCI8 related Operating System: Solaris 8 PHP Version: 4.2.3 New Comment: CVS snapshot solved the problem. No more garbage on output. Thanks. Previous Comments: ------------------------------------------------------------------------ [2002-11-11 09:54:55] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-11-11 07:03:41] pinned@spic.ru Following script does select from empty table and shouldn't return anything. <?PHP $ = @OCIlogon("test", "tst", "db"); unset($body); $q = "select * from users"; #table "users" is empty, so no rows should be returned $newsQ = OCIparse($newsDB, $q); $newsRES = OCIexecute($newsQ); OCIfetch($newsQ); $body = OCIresult($newsQ, 1); if($body) { #here php prints garbage print $body; } ?> bash-2.03$ ./php test.php X-Powered-By: PHP/4.2.3 Content-type: text/html IC27S ïÿÅøbash-2.03$ php compiled with the following options: --without-mysql --with-oci8 --with-mcrypt --with-gd --enable-track-vars --with-mod_charset --enable-discard-path Oracle server version is 8.1.7.4 Client libraries have version 8.1.7.0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20359&edit=1

« previous php.bugs (#24667) next »