php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56861 xmltype insert crashes
Submitted: 2006-02-26 12:02 UTC Modified: -
From: trevor dot lowing at gmail dot com Assigned:
Status: Open Package: PDO_OCI (PECL)
PHP Version: 5.1.1 OS: Windows XP
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: trevor dot lowing at gmail dot com
New email:
PHP Version: OS:

 

 [2006-02-26 12:02 UTC] trevor dot lowing at gmail dot com
Description:
------------
I am using the PDO extension to do record operations on a 9i DB on Windows XP (Apache/2.0.50 (Win32) DAV/2 PHP/5.1.1). Not having any issues with date and string type columns but attempting to insert into a xmltype/clob column throws an Apache exception. I've tried the blob exampleI am using the PDO extension to do record operations on a 9i DB on Windows XP (Apache/2.0.50 (Win32) DAV/2 PHP/5.1.1). Not having any issues with date and string type columns but attempting to insert into a xmltype/clob column throws an Apache exception. I've tried the blob example from the PHP docs and another article ( http://netevil.org/node.php?uuid=4365876a-cee9-3009-7726-365876a51802) with the same results:

Apache.exe - Application Error

The instruction at "0x612e4e8f" referenced memory at "0x000000420". The memory could not be "read"

I try to catch the PDOException but the error is thrown by Apache. 

Reproduce code:
---------------
$db = new PDO('oci:', 'dew', 'password');
    $db->beginTransaction();
    $stmt = $db->prepare("insert into RECORD (RECORD_XML_TX)
    VALUES (EMPTY_CLOB()) RETURNING RECORD_XML_TX INTO ?)");
     // Open file for writing
     $fp = @fopen("tmp.xml","a+") or die("Could not open file");

    $stmt->bindParam(1,$fp, PDO::PARAM_LOB);
    try {
        $stmt->execute();
    } catch (PDOException $e) {
        echo  $e->getMessage() . "<br/>";
        die();
    }
    $stmt->commit();
     // Close the file
     @fclose($fp);


Expected result:
----------------
Have xml inserted into the RECORD.RECORD_XML_TX xmltype column. I've done inserts using the OCI extension on the same database without any problems. As I mentioned, other column types work perfectly.

Actual result:
--------------
Apache.exe - Application Error

The instruction at "0x612e4e8f" referenced memory at "0x000000420". The memory could not be "read"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-05 07:38 UTC] ai dot revolutions at gmail dot com
Hi Trevor,

I managed to correct the bug here. I happened to have SoftICE debugger running in the background. So, ensure you don't have a system debugger running at your place too. 

Also try to disable some database services at startup, notable the 9i one, and if you have IIS or any other webserving services, disable them. Restart your machine and start Apache first. Then start the other services you stopped. If that worked, google a good way to start Apache before any other service. Good luck. Hope that helps!

Come back if it doesn't, we shall try another thing together.

Email : ai [dot] revolutions [at] gmail [dot] com

Shailen Sobhee
Mauritius
http://digitalgraphy.wordpress.com
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 15 12:01:26 2019 UTC