|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-23 03:50 UTC] sniper@php.net
[2003-04-28 11:16 UTC] sniper@php.net
[2003-04-30 05:35 UTC] admin at bitrix dot ru
[2003-05-08 02:04 UTC] thies@php.net
[2003-07-07 07:55 UTC] kepesp at bbrt dot hu
[2003-07-07 10:44 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
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 $