Re: PHP 4.0 Bug #6434: OCIFetchStatement() returns no data
| From: | thies at digicol dot de | Date: | Wed, 30 Aug 2000 13:35:36 +0000 |
| Subject: | Re: PHP 4.0 Bug #6434: OCIFetchStatement() returns no data | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31249@lists.php.net to get a copy of this message | ||
On Wed, Aug 30, 2000 at 12:13:45PM -0000, beate.kruess@airbus.dasa.de wrote:
> From: beate.kruess@airbus.dasa.de
> Operating system: hpux11, apache1.312, oracle8.0.5
> PHP version: 4.0.1pl2
> PHP Bug Type: Oracle related
> Bug description: OCIFetchStatement() returns no data
>
> the problem:
>
> OCIFetchStatement() returns only column data, which actual length is the half or less then the
> total column length;
this sounds as if your NLS_LANG is not set up. i use
NLS_LANG=american_america.WE8ISO8859P1
export NLS_LANG
in my apache startup-file.
plz try and report back.
tc
> for example: create table abc (str1 varchar2(10), str2 varchar2(10), str3 varchar2(10));
> with abc.str1='12345', abc.str2='123456',
> abc.str3='1234'
> then column str1 appears as '12345', str2 appears as blank
> column and str3 as '1234'
>
> the php example file:
>
> <HEAD>
> <TITLE>Ausgabe der FIN-Suche</TITLE>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> parent.Table.location.href = "Table.htm";
> -->
> </SCRIPT
> </HEAD>
>
> <BODY BGCOLOR="#ffb310" TEXT="#000000" LINK="#000000"
> ALINK="#FFFFFF" VLINK="#FF
> 0000">
>
> <?php
> $pass ="deich3";
> $user ="th84kb";
> $ohome="/opt/oracle/product/8.0.5";
> putenv("ORACLE_HOME=$ohome");
> $conn=OCILogon( $user, $pass, "test8") or die;
>
> $sql="SELECT str1, str2, str3 FROM abc ORDER BY str1";
> $stmt = OCIParse( $conn, $sql);
> OCIExecute( $stmt);
>
> echo "<BR><BR><TABLE BORDER='2' BORDERCOLOR='#110c79'
> WIDTH='100%' vspace='0'>";
>
> $nrows = OCIFetchStatement($stmt,$results);
> if ( $nrows > 0 )
> {
> print "<TABLE BORDER=\"1\">\n";
> print "<TR>\n";
> while ( list( $key, $val ) = each( $results ) ) {
> print "<TH>$key</TH>\n";
> }
> print "</TR>\n";
>
> for ( $i = 0; $i < $nrows; $i++ )
> {
> reset($results);
> print "<TR>\n";
> while ( $column = each($results) ) {
> $data = $column['value'];
> print $i;
> print $data[$i];
> print "<TD>$data[$i]</TD>\n";
> }
> print "</TR>\n";
> }
> print "</TABLE>\n";
> }
> else
> {
> echo "No data found<BR>\n";
> }
> print "$nrows Records Selected<BR>\n";
>
> OCIFreeStatement( $stmt);
> OCILogOff( $conn);
> ?>
>
> </BODY>
> </HTML>
>
> the php configuration line:
> ./configure --with-oci8=/opt/oracle/product/8.0.5 --with-apache=../apache_1.3.12
>
> (this statement includes automaticaly the mysql-module, why ? I don't need it)
>
> I have no php.ini file!
>
> system: hpux11, oracle8.0.5, apache_1.3.12
>
> Thanks Beate Kruess
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany