Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP adodb

trpost@gmail.com
Guest
 
Posts: n/a
#1: Mar 27 '07
I just started using the php adodb library for my Oracle transactions,
but am running into a problem when there are 2 simultaneous requests
going on at the same time.

The nature of the php app that I created is it runs a large query that
takes approximately 15 seconds to run and then prints the data out on
a web page.

If I open 2 separate browser windows and call the same report at about
the same time, or while one report is processing, I get the following
error:

Warning: Unknown: _oci_close_session: OCISessionEnd: ORA-03127: no new
operations allowed until the active operation ends in Unknown on line
0

When I was doing this same report using php4 and the OCI functions I
had no problems with this database and concurrent transactions, seems
to be something with how I am using adodb..

Here is my code snippet:

include('./adodb/adodb.inc.php');
$username = "user"; //oracle user
$password = "password"; //oracle password
$database = "testdatabase"; //tnsnames database entry

//Type of connection
$db = NewADOConnection('oci8');

//Sets the query results to come back as assoc arrays
$db->SetFetchMode(ADODB_FETCH_ASSOC);

function InvokeErrorHandler()
{
global $db; ## assume global
echo $db->ErrorMsg();
}

//Make the connection
$db->Connect($database, $username, $password);
if (!$db->Connect($database, $username, $password))
InvokeErrorHandler();

$query = "SELECT * FROM table";

$rs = $db->Execute($query);

This all seems common, as I have seen many examples using similar
config and connect info, but I cannot get past the concurrent issue, I
have tried using PConnect instead of connect, but I still get
problems.

Thanks


Bart the Bear
Guest
 
Posts: n/a
#2: Mar 28 '07

re: PHP adodb


On Tue, 27 Mar 2007 09:11:29 -0700, trpost wrote:
Quote:
I just started using the php adodb library for my Oracle transactions,
but am running into a problem when there are 2 simultaneous requests
going on at the same time.
>
The nature of the php app that I created is it runs a large query that
takes approximately 15 seconds to run and then prints the data out on a
web page.
>
If I open 2 separate browser windows and call the same report at about
the same time, or while one report is processing, I get the following
error:
>
Warning: Unknown: _oci_close_session: OCISessionEnd: ORA-03127: no new
operations allowed until the active operation ends in Unknown on line 0
>
When I was doing this same report using php4 and the OCI functions I had
no problems with this database and concurrent transactions, seems to be
something with how I am using adodb..
>
Here is my code snippet:
>
include('./adodb/adodb.inc.php');
$username = "user"; //oracle user
$password = "password"; //oracle password $database = "testdatabase";
//tnsnames database entry
>
//Type of connection
$db = NewADOConnection('oci8');
>
//Sets the query results to come back as assoc arrays
$db->SetFetchMode(ADODB_FETCH_ASSOC);
>
function InvokeErrorHandler()
{
global $db; ## assume global
echo $db->ErrorMsg();
}
>
//Make the connection
$db->Connect($database, $username, $password); if
(!$db->Connect($database, $username, $password)) InvokeErrorHandler();
>
$query = "SELECT * FROM table";
>
$rs = $db->Execute($query);
>
This all seems common, as I have seen many examples using similar config
and connect info, but I cannot get past the concurrent issue, I have
tried using PConnect instead of connect, but I still get problems.
Is this a Windows installation of Apache? I have no such problem
with either Linux or Solaris.
trpost@gmail.com
Guest
 
Posts: n/a
#3: Apr 2 '07

re: PHP adodb


I get the same problem on both Windows and Solaris

trpost@gmail.com
Guest
 
Posts: n/a
#4: Apr 2 '07

re: PHP adodb


On Apr 2, 1:38 pm, trp...@gmail.com wrote:
Quote:
I get the same problem on both Windows and Solaris
Is there anything better than adodb, that supports concurrent
transactions. I am still getting the following if I call the same
query at the same time:

Warning: ocilogon() [function.ocilogon]: OCISessionBegin: ORA-03127:
no new operations allowed until the active operation ends

Andy Hassall
Guest
 
Posts: n/a
#5: Apr 4 '07

re: PHP adodb


On 27 Mar 2007 09:11:29 -0700, trpost@gmail.com wrote:
Quote:
>Warning: Unknown: _oci_close_session: OCISessionEnd: ORA-03127: no new
>operations allowed until the active operation ends in Unknown on line
>0
What version of PHP and Oracle client?

Does your table contain LOBs? There seem to be a few bugs that result from
problems in LOBs that result in this error.

http://www.google.co.uk/search?q=ORA-03127+oci8

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Andy Hassall
Guest
 
Posts: n/a
#6: Apr 4 '07

re: PHP adodb


On 2 Apr 2007 14:42:44 -0700, trpost@gmail.com wrote:
Quote:
>On Apr 2, 1:38 pm, trp...@gmail.com wrote:
Quote:
>I get the same problem on both Windows and Solaris
>
>Is there anything better than adodb, that supports concurrent
>transactions. I am still getting the following if I call the same
>query at the same time:
>
>Warning: ocilogon() [function.ocilogon]: OCISessionBegin: ORA-03127:
>no new operations allowed until the active operation ends
ADOdb is just a wrapper for the various database extensions, in this case the
oci8 extension to access Oracle; it won't be responsible for the error, which
is coming from the database extension level.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
trpost@gmail.com
Guest
 
Posts: n/a
#7: Apr 6 '07

re: PHP adodb


I am using php version 5.05 and Oracle instantclient_10_2 and adodb
4.96. I was previously using php 4.3.9 and the ora functions, which
worked fine with the same queries, however with php 5+ I cannot use
the ora fxns and insead must use the oci fxns which is where I run
into this problem that I cannot run the same long query at the same
time. I did some more reading about blocking vs. non-blocking
queries... Is it possible to switch between the 2 using php/oci? Or
any other ideas??

trpost@gmail.com
Guest
 
Posts: n/a
#8: Apr 13 '07

re: PHP adodb


Ok, so I upgraded php from 5.0.5 to 5.2.1 and the problem went away,
but it is not so easy for me to upgrade my other Unix envoronment as
anything after php 5.0.5 requires me to upgrade mysql as well. So what
is it about 5.0.5 that is causing this error, and how do I fix it
without upgrading.


Closed Thread