Re: [PHP] PHP/Oracle Command line Segmentation Fault

2003-01-10 Thread Christopher Ditty
Anyone?

CDitty

 Christopher Ditty [EMAIL PROTECTED] 01/09/03 04:04PM 
I have successfully installed oracle 8.1.7 w/ php and have it
configured
to run from the command line.  When I run a simple script that
connects,
and selects records from the database, the last line is a segmentation
fault error.  This does not seem to happen when the same script is run
through the browser.  

Can anyone offer any help or advice?  The code is listed below.

CDitty

#!/usr/bin/php
?
function oci8Connect(){
 $db_conn = ocilogon(usrname,pwd, dbase);
 if (!$db_conn){
echo Helpbr;
exit ();
 }
 echo Connectedbr;
 return ($db_conn);
}

$conn = oci8Connect();

$stmt = ociparse($conn,select * from US_MSTR);
  ociexecute($stmt);

$i=0;
$row = array();

  while(OCIFetchInto($stmt, $row, OCI_ASSOC)){
# do stuff with $row...
echo $row['US_ID'] .  $ibr;
$i++;
}

ocifreestatement($stmt);
ocilogoff($conn);
?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP/Oracle Command line Segmentation Fault

2003-01-10 Thread Maxim Maletsky

Are you saying that OCILogoff gives you the segfault?
It's very strange because OCILogoff is actually an empty function -
all the contents of that function is commented and is there only for the
backwards compatibility reasons. Zend API ends OCI sessions
automatically as script's execution ends.

Do what, try removing the last function from your script and run again.
If the segfault happens again submit a bug report at http://bugs.php.net
with all the possible details (server log, script, system etc) and I
will take over the bug myself (I maintain the OCI8 extension)


--
Maxim Maletsky
[EMAIL PROTECTED]



Christopher Ditty [EMAIL PROTECTED] wrote... :

 Anyone?
 
 CDitty
 
  Christopher Ditty [EMAIL PROTECTED] 01/09/03 04:04PM 
 I have successfully installed oracle 8.1.7 w/ php and have it
 configured
 to run from the command line.  When I run a simple script that
 connects,
 and selects records from the database, the last line is a segmentation
 fault error.  This does not seem to happen when the same script is run
 through the browser.  
 
 Can anyone offer any help or advice?  The code is listed below.
 
 CDitty
 
 #!/usr/bin/php
 ?
 function oci8Connect(){
  $db_conn = ocilogon(usrname,pwd, dbase);
  if (!$db_conn){
   echo Helpbr;
 exit ();
  }
  echo Connectedbr;
  return ($db_conn);
 }
 
 $conn = oci8Connect();
 
 $stmt = ociparse($conn,select * from US_MSTR);
   ociexecute($stmt);
 
   $i=0;
   $row = array();
 
   while(OCIFetchInto($stmt, $row, OCI_ASSOC)){
   # do stuff with $row...
   echo $row['US_ID'] .  $ibr;
   $i++;
   }
 
   ocifreestatement($stmt);
   ocilogoff($conn);
 ?
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP/Oracle Command line Segmentation Fault

2003-01-09 Thread Christopher Ditty
I have successfully installed oracle 8.1.7 w/ php and have it configured
to run from the command line.  When I run a simple script that connects,
and selects records from the database, the last line is a segmentation
fault error.  This does not seem to happen when the same script is run
through the browser.  

Can anyone offer any help or advice?  The code is listed below.

CDitty

#!/usr/bin/php
?
function oci8Connect(){
 $db_conn = ocilogon(usrname,pwd, dbase);
 if (!$db_conn){
echo Helpbr;
exit ();
 }
 echo Connectedbr;
 return ($db_conn);
}

$conn = oci8Connect();

$stmt = ociparse($conn,select * from US_MSTR);
  ociexecute($stmt);

$i=0;
$row = array();

  while(OCIFetchInto($stmt, $row, OCI_ASSOC)){
# do stuff with $row...
echo $row['US_ID'] .  $ibr;
$i++;
}

ocifreestatement($stmt);
ocilogoff($conn);
?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php