php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39468 PHP throws ociexecute(): supplied arg is not a valid OCI8-Stmt resource
Submitted: 2006-11-11 00:36 UTC Modified: 2006-11-13 22:57 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: c_peruma at qualcomm dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.4.4 OS: Windows XP Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: c_peruma at qualcomm dot com
New email:
PHP Version: OS:

 

 [2006-11-11 00:36 UTC] c_peruma at qualcomm dot com
Description:
------------
Our application page loads with an OCI error. 
After this the application froze and We try to re-login the page gets loaded properly.But we are not able to reproduce the problem. But it happens at very frequently, but dont know what causes the problem.
 
Error seen was:

Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource 
Fatal error: Call to a member function on a non-object.

The piece of code giving the error is :
 
    // Create a collecting type in Oracle
    // that can hold around 10000 Phone numbs.
    $szType="CREATE OR REPLACE TYPE PHONELIST AS VARRAY(10000) OF VARCHAR(15)";
    $qHandle=OCIParse($szType,$ORACLE);
    OCIExecute($qHandle);

    // Insert the Selected Phone numbers 
    $collection = OciNewCollection($ORACLE,"PHONELIST"); 
    for($i=1 ; $i <= $nCount ; $i++) {
      $collection->append($szMIN[$i]);
    }

We get error in the OCIExecute line . No error was reported for Oracle Connection made by OCINLogon.It seems that oracle parse has failed. But parse is not giving any error though.

And followed by fatal error in OCINewCollection().

I found this related to the bug information found in.
http://bugs.php.net/bug.php?id=3910




Expected result:
----------------
Page should get loaded properly.

Actual result:
--------------
Error seen was:

Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource 
Fatal error: Call to a member function on a non-object.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-11 00:51 UTC] tony2001@php.net
http://php.net/oci_parse
resource oci_parse ( resource connection, string query )

and not
resource oci_parse ( string query, resource connection )
 [2006-11-13 18:19 UTC] c_peruma at qualcomm dot com
Sorry that was a typo .

I am using $qHandle=OCIParse($ORACLE,$szType);

Your help in regard to this problem would be appreciated.
Thanks
Savitha
 [2006-11-13 18:24 UTC] tony2001@php.net
Without this typo your code works just fine, so please provide a real reproduce code.
 [2006-11-13 22:24 UTC] c_peruma at qualcomm dot com
The code works fine at my end too. 
This piece of code is in a session enabled PHP page.
But At some point, we are hitting this problem . 

I found a bug related to this http://bugs.php.net/bug.php?id=3910
where the pages shuttle between working and non-working pages. The problem is not consistent and even we are not able to reproduce.

Please clarify whether any problem with PHP - Oracle could cause this error .

Thanks
Savitha
 [2006-11-13 22:29 UTC] tony2001@php.net
No, if you receive false from oci_execute(), then there was an error, which should have been reported.
I don't think it's a problem of PHP, but nevertheless I recommend you to use OCI8 from PECL with PHP4 instead of the bundled one.
 [2006-11-13 22:57 UTC] c_peruma at qualcomm dot com
The scenario we saw was OCIParse has returned false ..but there was no error reported by OCIParse. Next call after OCIParse is OCIExecute and OCIExecute failed with error.

Thanks
Savitha
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC