ID:               28924
 Comment by:       tanis at altralogica dot it
 Reported By:      ben at grinvalds dot net
 Status:           Open
 Bug Type:         OCI8 related
 Operating System: Windows XP
 PHP Version:      5.0.0RC3
 Assigned To:      tony2001
 New Comment:

I am experiencing the same problem with Apache 1.3.29 and PHP 5.0.0,
5.0.1 and 5.0.2-dev of today (August, 23), so I guess this has not been
solved yet.

Is there anything I could to do help debug this problem? I am getting
mad trying to work with this configuration but I cannot do otherwise. 
Till now 5.0.0 is the only one that is working from time to time. All
other versions hung immediately.


Previous Comments:
------------------------------------------------------------------------

[2004-07-19 23:46:09] ben at grinvalds dot net

I went and got the latest version PHP 5.0.1-dev (cli).  I ran the
following script from the console and it consistantly hung the php
execution.  This is how I executed it at the command prompt (> php.exe
-f test.php).
Here is the script I ran.  The object count for my database was just
over 10,000 records.

<?php 
    $conn = oci_connect("scott", "tiger", "yourhost");
    $stmt = oci_parse($conn, "select * from all_objects where owner =
'SYS'");
    oci_execute($stmt);
    $count = 0;
    while ($row = oci_fetch_assoc($stmt))
        echo $count++ . " ";
    oci_free_statement($stmt);
    oci_close($conn);
    echo "Executed Query";
?>

------------------------------------------------------------------------

[2004-07-19 17:24:56] [EMAIL PROTECTED]

Could you please try latest CVS snapshots from http://snaps.php.net?
And could you try to run the code from console too? 
Does it crash?

------------------------------------------------------------------------

[2004-06-30 18:15:52] ben at grinvalds dot net

I've been doing some more investigation.  When I changed my php
configuration in the Apache http.conf from sapi to cgi, the problem
goes away.  Looks like the problem is related to the sapi module.

------------------------------------------------------------------------

[2004-06-29 16:11:23] ben at grinvalds dot net

I have included a script which causes a reference memory error to occur
more frequently.  If you run this script three or four times back to
back you will get the error.

Ben

<?php
class Test {
  var $_results;
  var $_ncount;
  function display() {
    $conn = oci_connect("scott", "tiger", "host_name");
    $stmt = oci_parse($conn, "select ENAME from emp");
    oci_execute($stmt);
    $this->_ncount = oci_fetch_all($stmt, $this->_results);
    oci_free_statement($stmt);
    oci_close($conn);
    for ($i = 0; $i < $this->_ncount; $i++) {
        echo $this->_results["ENAME"][$i];
  }}}
$test = new Test();
$test->display();
?>

------------------------------------------------------------------------

[2004-06-25 16:56:39] ben at grinvalds dot net

Description:
------------
I have been testing my code in PHP5 and have been getting regular
Apache.exe Application errors.

When I run the script below a few times, I will consistantly get
reference memory errors.  Even after I re-boot my system.  My
application makes many calls to an Oracle database.  I'm not sure if
this is specifically related to OCI or if it is a more general PHP
memory issue.

Environment:
  OS: Windows XP Professional with SP1
  Server: Apache 1.3.31 (Win32)
  DB: Oracle 8.4.7  

Reproduce code:
---------------
<?php
  $conn = oci_connect("scott", "tiger", "your_host_name");
  for ($p=0; $p <= 500; $p++) {
    $stmt = oci_parse($conn, "select ENAME from emp");
    oci_execute($stmt);
    $i = 0;
    while (oci_fetch($stmt)) {
      $i++;
      $name = oci_result($stmt, "ENAME");
      echo $name . "<br>";
    }
    echo "<br>";
    echo $i . " Records Selected. Count:" . $p;
    echo "<br><br>";
  }
  oci_free_statement($stmt);
  oci_close($conn);
?> 

Expected result:
----------------
I should be able to run this without encountering any Apache.exe
Application error.

Actual result:
--------------
The error message that I am receiving is: The instruction at
"0x6042fdc2" refereced memory at "0x00000010". The memory could not be
"read".



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28924&edit=1

Reply via email to