php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23151 ORA-01013 user requested cancel of current operation
Submitted: 2003-04-10 09:32 UTC Modified: 2003-07-07 10:44 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: lamo at bitrix dot ru Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4.3.2RC1 OS: SunOS 5.8
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lamo at bitrix dot ru
New email:
PHP Version: OS:

 

 [2003-04-10 09:32 UTC] lamo at bitrix dot ru
Pages with definite structure generate error "ORA-01013 user requested cancel of current operation".

Approximate structure of page which generates ORA-01013 error:
1. Query that returns even records.
2. Loop by this query (fetch). Any query in the loop .
3. Query which is executed for a long time.

Page example:
<?
set_time_limit(0);

$DB_User = "login";
$DB_Pass = "password";
$DB_Name = "name";

if(!($db_Conn = @OCILogon($DB_User, $DB_Pass, $DB_Name)))
	die("Bad Connect");

//loop
for($i=0; $i<150; $i++)
{
	echo "Step ".($i+1);

	/*************
	First query must return more than one record and even records (that vary strange!).
	If it returns odd records, error will not appear.
	**************/
	OCIExecute($r = OCIParse($db_Conn, "
				SELECT 1 FROM DUAL UNION ALL
				SELECT 2 FROM DUAL UNION ALL
				SELECT 3 FROM DUAL UNION ALL
				SELECT 4 FROM DUAL UNION ALL
				SELECT 5 FROM DUAL UNION ALL
				SELECT 6 FROM DUAL UNION ALL
				SELECT 7 FROM DUAL UNION ALL
				SELECT 8 FROM DUAL UNION ALL
				SELECT 9 FROM DUAL UNION ALL
				SELECT 10 FROM DUAL"
				)
			);

   /******
   This is fetch for each record and any query in the loop.
   ******/
	while(OCIFetch($r))
		OCIExecute(OCIParse($db_Conn, "SELECT 'x' FROM DUAL"));

	/******
	Any query which is executed for a long time. During execution this query the error ORA-01013 will appear.
	******/
	OCIExecute(
		OCIParse($db_Conn, "SELECT SHORT_DELAY FROM DUAL")
		);

	echo "- OK <br>";
}

echo "<p>Done.</p>"
?>

Where SHORT_DELAY - oracle function for short delay:

CREATE OR REPLACE FUNCTION SHORT_DELAY
RETURN NUMBER
IS
	vMAX	NUMBER:=10000;
	vTMP	VARCHAR2(2000):='123123123123123123123';
BEGIN
	WHILE vMAX>0
	LOOP
		vTMP := REPLACE(vTMP, '1', '22');
		vMAX := vMAX-1;
	END LOOP;
	RETURN 0;
END;
/

This page will output:
-----
output 1:
-----
Step 1
Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-01013: user requested cancel of current operation in /opt/hosting/prj/www/test.php on line 45

-----
output 2:
-----
Step 1- OK 
Step 2
Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-01013: user requested cancel of current operation in /opt/hosting/prj/www/text.php on line 45
------

Configure Line:
'./configure' '--with-curl=/usr/local/curl-7.10.3' '--with-oci8' '--with-zlib' '--with-gd' '--without-mysql' '--with-apxs=/opt/hosting/prj/bin/apxs' '--with-openssl=/usr/local' 

Oracle version:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production

OCI8 revision:  $Revision: 1.183.2.2 $  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-28 11:16 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-04-30 05:35 UTC] admin at bitrix dot ru
The latest build does not solve the problem. 

Current installed version is 4.3.2-RC3-dev. 
OCI8 Revision: 1.183.2.3 $
 [2003-05-08 02:04 UTC] thies@php.net
i cannot reproduce this problem (and i tried).
unless i get a testcase that i can reproduce there's 
nothing i can do.

 [2003-07-07 07:55 UTC] kepesp at bbrt dot hu
I have the same problem on a SunOS, but I can't reproduce it with the example code. 
I noticed that, I got this error message when the database server heavily loaded.
 [2003-07-07 10:44 UTC] sniper@php.net
More appropriate status. (waited for feedback for a proper testcase)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC