php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36321 Crash in $this->toto=ressource_id
Submitted: 2006-02-07 16:44 UTC Modified: 2006-04-18 07:13 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: gwalschaerts at cg19 dot fr Assigned:
Status: Closed Package: OCI8 related
PHP Version: 5.1.2 OS: windows2003
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: gwalschaerts at cg19 dot fr
New email:
PHP Version: OS:

 

 [2006-02-07 16:44 UTC] gwalschaerts at cg19 dot fr
Description:
------------
i have a crash when i script this

$this->Requete_Id = OCIparse($this->Connect_Id, $Query);

in php 5.1.1 it's run perfectly

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-07 16:46 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-02-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-04-06 03:27 UTC] crescentfreshpot at yahoo dot com
This is caused by not freeing the variable holding the resource returned from ociparse after you're done with it.

Try:
$this->Requete_Id = OCIparse($this->Connect_Id, $Query);
// ...
OCIFreeStatement($this->Requete_Id);

Should fix the problem.

I believe this free-ing is *supposed* to happen automagically when the variable falls out of scope or your script ends (it does in the mysql(i) extension as well as pdo_oci) but is not happening in oci8 5.1.2 (obviously). Not sure if that is expected behaviour (should be documented nonetheless).
 [2006-04-18 03:21 UTC] crescentfreshpot at yahoo dot com
This 'bug'/issue seems to be gone in the latest 5.1.3RC2 win32 build. statement resources and lob descriptors seem to all be freed automagically.
 [2006-04-18 07:13 UTC] tony2001@php.net
Great.
Works fine -> closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC