From:             [EMAIL PROTECTED]
Operating system: Solaris 8 
PHP version:      4.2.3
PHP Bug Type:     OCI8 related
Bug description:  php returns garbage when no rows selected

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 bug report at http://bugs.php.net/?id=20359&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20359&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20359&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20359&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20359&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20359&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20359&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20359&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20359&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20359&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20359&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20359&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20359&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20359&r=isapi

Reply via email to