#23151 [Opn->Fbk]: ORA-01013 user requested cancel of current operation
| From: | sniper@php.net | Date: | Wed, 23 Apr 2003 08:50:51 +0000 |
| Subject: | #23151 [Opn->Fbk]: ORA-01013 user requested cancel of current operation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38163@lists.php.net to get a copy of this message | ||
ID: 23151
Updated by: sniper@php.net
Reported By: lamo at bitrix dot ru
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: SunOS 5.8
PHP Version: 4.3.2RC1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-04-10 09:32:55] 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 $
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23151&edit=1