From:             rarteaga at icaro dot com dot ec
Operating system: Linux RH9 and RH7.3
PHP version:      4.3.2
PHP Bug Type:     OCI8 related
Bug description:  Segmentation fault

Description:
------------
Hi, I've installed Linux RH 9.0 and Oracle 9i, I'm trying to access the
database from a php script, I make de connection and make a simple select
like this:

"SELECT EMPNO from EMP"

And I get the information just fine with the oci functions (OCILogon,
OCIParse, OCIExecute, etc...). Now I get a segmentation fault when I try
to retrieve information of fields that are string or characteres,
something like this:

"SELECT JOB from EMP"

The script crashes and dies saying "segmentation fault"

I'm connecting to the database as user "SCOTT" and getting information
from table  EMP.

I can connect from an aplication I've developed in VB60 from a remote
aplication server I have... but PHP is crashing...

Best Regards

Reproduce code:
---------------
#!/usr/bin/php -q
<?php
putenv("ORACLE_HOME=/opt/oracle/product/9.2.0");
$username = "SCOTT";
$passwd = "TIGER";
$db="icaro";
$conn = OCILogon($username,$passwd,$db);
if (!$conn) {
   echo "Connection failed";
   echo "Error Message: [" . OCIError($conn) . "]";
   exit;
}
else {
  echo "Connected!"."\n";
  $parse = OCIParse($conn,"select JOB from EMP");
  OCIDefineByName($parse,"ENAME",$job);
  OCIExecute($parse,OCI_DEFAULT);
  echo "\nRecuperacion de datos\n";
  while (OCIFetchinto ($parse, $row, OCI_ASSOC)) {
    echo $job;
        echo "\n";
  }
}
?>

Expected result:
----------------
I expect to see de job titles..

Actual result:
--------------
[EMAIL PROTECTED] htdocs]# ./oracle.php
Connected!
Segmentation fault

-- 
Edit bug report at http://bugs.php.net/?id=24740&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24740&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24740&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24740&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24740&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24740&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24740&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24740&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24740&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24740&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24740&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24740&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24740&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24740&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24740&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24740&r=gnused

Reply via email to