ID: 24740 Updated by: [EMAIL PROTECTED] Reported By: rarteaga at icaro dot com dot ec -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Linux RH9 and RH7.3 PHP Version: 4.3.2 New Comment:
Could you please generate a backttrace from the crash? Previous Comments: ------------------------------------------------------------------------ [2003-07-21 11:58:21] rarteaga at icaro dot com dot ec I'm sorry I made a mistake on the line OCIDefineByName($parse,"ENAME",$job); The correct value must be JOB, it will be like this: OCIDefineByName($parse,"JOB",$job); Still doesn't work.. Regards ------------------------------------------------------------------------ [2003-07-21 11:54:58] rarteaga at icaro dot com dot ec 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 this bug report at http://bugs.php.net/?id=24740&edit=1