php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37139 OCIExecute() hangs on DATE column related INSERT's
Submitted: 2006-04-19 21:10 UTC Modified: 2006-04-28 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: aphexddb at gmail dot com Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 5.1.3RC2 OS: Windows XP SP2
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: aphexddb at gmail dot com
New email:
PHP Version: OS:

 

 [2006-04-19 21:10 UTC] aphexddb at gmail dot com
Description:
------------
When executing a succesfully prepared INSERT statement that contains a DATE column, OCIExecute hangs indefinitely when data is supplied for that column.

I tested the SQL statement(s) in question by pasting them into both TOAD and SQLPlus. They all completed successfully. The '$workingSQL' statement executes correctly from PHP. The other '$breaksPhp' statements will hang right as OCIExecute() is called. 

PHP Version used: Apache/2.0.54 (Win32) PHP/5.1.3-dev. Also tried PHP versions : 5.0.3 and 5.1.2 for grins. http://snaps.php.net seems to be down at the time of this posting, unable to run the debug pack.

Diffrences in PHP.INI from the .dist file:

error_reporting  =  E_ALL
extension=php_gd2.dll
extension=php_ldap.dll
extension=php_mysql.dll
extension=php_oci8.dll
extension=php_oracle.dll
extension=php_sockets.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_soap.dll
extension=adodb.dll
SMTP = mail.mydomain.com


Reproduce code:
---------------
$sql = "INSERT blah, blah ...see below"
$stmt = OCIParse($this->_connectionID, $workingSQL);
$rs = OCIExecute($stmt);

<...browser/php hangs here...>

The table in question:

CREATE TABLE PROVIDER ( 
  PROVIDER_ID          NUMBER        NOT NULL, 
  SITE_NAME            VARCHAR2 (50), 
  FIRST_NAME           VARCHAR2 (20), 
  LAST_MOD_USER        VARCHAR2 (20), 
  LAST_MOD_DATE        DATE          NOT NULL, 
  CONSTRAINT PROVIDER_PK
  PRIMARY KEY ( PROVIDER_ID ) ) ; 

Example SQL statements:

$workingSQL = "INSERT INTO PROVIDER ( PROVIDER_ID, SITE_NAME, FIRST_NAME, LAST_MOD_USER ) VALUES ( '351', 'Site Name', 'John', 'jsmith') ";

$breaksPhpSQL = "INSERT INTO PROVIDER ( PROVIDER_ID, SITE_NAME, FIRST_NAME, LAST_MOD_USER, LAST_MOD_DATE ) VALUES ( '351', 'Site Name', 'John', 'jsmith', '2006-04-19' ) ";

$breaksPhpSQL2 = "INSERT INTO PROVIDER ( PROVIDER_ID, SITE_NAME, FIRST_NAME, LAST_MOD_USER, LAST_MOD_DATE ) VALUES ( '351', 'Site Name', 'John', 'jsmith', TO_DATE('2006-04-19','RR-MM-DD') ) ";



Expected result:
----------------
OCIExecute() should complete without hanging and return a result.

Actual result:
--------------
PHP hangs indefinitely for whatever page you were looking at. In other browser windows while the main one is hung, PHP will still render other, simpler pages but anything using OCI is unavailable.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-19 21:34 UTC] tony2001@php.net
Can't reproduce in any combination I can try here:
native client + Oracle 9, OIC + Oracle 9, OIC + Oracle 10.
Snapshots and the debugpack are located here temporarily:
http://php.emini.dk/snaps/win32/
Please try the latest snapshot and provide the backtrace if you're still able to reproduce it.
 [2006-04-20 13:50 UTC] aphexddb at gmail dot com
Turns out if you have too many open cursors (more then the curent Oracle pool allows) this will happen. Increased it and PHP was just fine.
 [2006-04-20 13:59 UTC] tony2001@php.net
Hm. This is still wrong. Could you plz tell me how to reproduce it?
 [2006-04-28 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC