php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21491 Hang during ociexecute
Submitted: 2003-01-07 08:19 UTC Modified: 2003-01-08 04:17 UTC
From: stephan dot rey at zurich dot ch Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.2.3 OS: Suse Linux 8.0
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stephan dot rey at zurich dot ch
New email:
PHP Version: OS:

 

 [2003-01-07 08:19 UTC] stephan dot rey at zurich dot ch
I'm trying to get some (existing) records oput of an Oracle8-Database. As long as I do a query, which can't have any results, everything works fine. But if I write a SELECT-statement, which should give at least one result, the whole thing hangs or I get the message 'The page cannot be displayed'.


example (which causes me troubles):

<?php
putenv('ORACLE_HOME=/opt/oracle/OraHome1');         
putenv('TNS_ADMIN=/opt/oracle/OraHome1/network/admin');         
putenv('TWO_TASK=/opt/oracle/OraHome1/network/admin/tnsnames.ora');
$user="";
$pwd="";
$conn = ocilogon($user,$pwd,"TNEUN2");
$sql="select * from t_person WHERE name like 'Muster' ORDER BY name, firstname, notes, racf";
$stmt=ociparse($conn,$sql);
ociexecute($stmt);
echo $sql;
?>


The 'echo-statement' is only used to verify that the script has finished! The statement "select max(id_pers) from t_person" for example works fine.

Thanks in advance!
Greetings
Stephan

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-07 09:32 UTC] kalowsky@php.net
Works fine on Solaris in DSO and CGI.  You might want to test the connection to see if it happened and call OCIError as well.
 [2003-01-07 14:49 UTC] michael dot mauch at gmx dot de
Does it help if you 'do it by the book', <http://www.php.net/manual/en/ref.oci8.php>, i.e. don't use putenv() or Apache's SetEnv, but set the environment variables before you start Apache? And did you check whether your Apache is linked to pthread (see the page mentioned above)?
 [2003-01-08 03:38 UTC] stephan dot rey at zurich dot ch
Thanks champs!

The problem was the putenv()-statements. I've entered the definitions for these variables right in front of the apache-start-script and know it works great!
 [2003-01-08 04:17 UTC] derick@php.net
Trust our document the next time please :-)

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 14:01:28 2024 UTC