|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2000-09-25 18:56 UTC] stas@php.net
  [2000-10-28 23:33 UTC] sniper@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 12:00:01 2025 UTC | 
/* 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.