php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8165 Database output is only one char per column
Submitted: 2000-12-08 07:39 UTC Modified: 2001-02-18 06:28 UTC
From: sven dot voigt at lhsystems dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.0.3pl1 OS: SuSE Linux 6.3/Kernel 2.2.13
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sven dot voigt at lhsystems dot com
New email:
PHP Version: OS:

 

 [2000-12-08 07:39 UTC] sven dot voigt at lhsystems dot com
We're using an Oracle 8051 with Apache 1.3.12. The following code fragment runs faultless on PHP3.0.15, but produces one character output per column only on PHP4.0.3pl1:

while (OCIFetch($Stmt)) {
   echo "  <TR>\n    ";
   for ($Column=1; $Column < $NumCols; $Column++) {
      $spalte_wert=trim(OCIResult($Stmt,$Column));
      $spalte_typ=OCIColumnType($Stmt,$Column);
      if($spalte_wert=="")
         $spalte_wert="&nbsp;";
      if($spalte_typ=="NUMBER")
         $spalte_ausrichtung="RIGHT";
      else
         $spalte_ausrichtung="LEFT";
      echo ('<TD ALIGN="'.$spalte_ausrichtung.'">');
      echo "$spalte_wert";
      echo "</TD>";
   }
   echo "\n  </TR>\n";
}

The docs don't state any special treatment due to PHP4, so the code should be running on PHP3 and on PHP4. Or am I wrong? To me it looks like a bug.

For further infos please mail to stated email address above. Ciao!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-07 19:51 UTC] sniper@php.net
Does this happen with PHP 4.0.4 ?

--Jani
 [2001-01-09 11:50 UTC] cynic@php.net
user feedback:
When I recompiled Apache with PHP 4.0.4 the problem seemed to have vanished. 
Now a colleague reported that this happened again. An Apache restart did help. So far, I couldn't figure out what the *real* problem was... As soon as I know, I'll report it to bugs.php.net

 [2001-02-18 06:28 UTC] thies@php.net
i'm sure your problem will dissapear once you set all 
oracle related env-vars *before* you start apache.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 20:01:31 2024 UTC