php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29608 OCi reports OCIStmtExecute: ORA-24324: service handle not initialized
Submitted: 2004-08-11 09:44 UTC Modified: 2004-08-19 01:00 UTC
Votes:25
Avg. Score:4.5 ± 0.8
Reproduced:20 of 21 (95.2%)
Same Version:12 (60.0%)
Same OS:7 (35.0%)
From: tomek at matrox dot pl Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 5.0.0 OS: W2k, Red Hat
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: tomek at matrox dot pl
New email:
PHP Version: OS:

 

 [2004-08-11 09:44 UTC] tomek at matrox dot pl
Description:
------------
I wrote my site using PHP 4.3.8, W2k and Apache in both version 2 and 1.3.x. Everything was all right until the day when I decided to change my php version (now I have 5.0.0)

Scripts which executes oracle queries sometimes works sometimes not. I've notice 2 kinds of situations:

First : apache reports :

Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-24324: service handle not initialized in /usr/local/apache/htdocs/dupa1.php on line 5 

Second : apache child process is killed

I thought that problem is in OS. I tried to run my site on Red Hat with apache 1.3.31 and php 5.0.0 and problem is still the same.

Changes in version of Oracle client also doesn't resolve the problem.



Reproduce code:
---------------
$query = 'SELECT * FROM opal_sesje';
$conn = ocilogon('xxx','xxx','xxx');
$stmt = OCIParse($conn, $query); 
OCIexecute($stmt, OCI_DEFAULT);
$error = OCIError($stmt);
print_r($error);

Expected result:
----------------
just blank page

Actual result:
--------------
blank page or OCI warning or no result

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-11 09:51 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2004-08-11 16:34 UTC] izhekov at ppartner dot com
I have the same problem. If you search in google for this error, you'll find some sites that have the same problem. I'm using Windows 2003 Server. I think this bug is fatal for many people. I think the OCI8 functions did not work at all in PHP 5.
 [2004-08-11 17:43 UTC] tony2001@php.net
>I think the OCI8 functions did not work at all in PHP 5.
you're wrong.
OCI8 functions work for most of the people.
Perhaps you're misusing them or having some problems with Oracle client/Oracle server.
I still need more info to find out what happens and/or to reproduce your situation. Feel free to provide this info and open the bug report again.
 [2004-08-12 10:09 UTC] izhekov at ppartner dot com
I migrate from PHP 4 to PHP 5 on my Windows 2003 server. Everything goes fine, but when I try to use an PHP application that uses Oracle database I receive the error mentioned above. I restarted the Oracle server but that not helped me. Other applications and PHP 4 works fine with my Oracle server, but PHP 5 did not.

Last night the power supply goes down unexpectally and both Oracle server and web server was restarted. Now everything seems to be fine, but I'm sure the problem exists and many people will have the same problems also.

Searching in Google for: 
http://www.google.com/search?hl=bg&ie=UTF-8&q=%22service+handle+not+initialized+in%22+%2Bwarning&lr=
shows many sites with the same problem.
 [2004-08-12 11:02 UTC] izhekov at ppartner dot com
I've tried to reproduce this problem.
I've installed 2 apache services on different ports 80 and 81 - first of them using PHP5 and the other using PHP4 then I restarted the system.
When first I access my scripts using PHP5 on port 80 everythings goes fine.
Running scripts afterthat with PHP4 on port 81 also worked fine.
When I tried to access again scripts on apache service running on 80 port, errors occured again:

---------
Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-24324: service handle not initialized in C:\SERVER\HTTPD\htdocs\service\db_modul.php on line 21

Warning: ocifetch() [function.ocifetch]: OCIFetch: ORA-24338: statement handle not executed in C:\SERVER\HTTPD\htdocs\service\db_modul.php on line 27
----------
 [2004-08-19 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".
 [2004-08-30 10:21 UTC] symedeot at yahoo dot fr
I have exactly the same problem ! If works sometimes, sometime not. If you ask the same page again, it should work or not... 


Warning: oci_execute() [function.oci-execute]: OCIStmtExecute: ORA-24324: descripteur de service non initialis? in ...
Warning: ocifetch() [function.ocifetch]: OCIFetch: ORA-24338: descripteur d'instruction non ex?cut? in...

Just try to access Oracle like this : 

$conn = OCILogon("GPE", "gpe","PLSE");
$stmt = OCIParse($conn,$myrequest);
OCI_Execute($stmt,OCI_DEFAULT);
while ( OCIFetch($stmt) )
    {
    }
OCIFreeStatement($stmt);
OCILogoff($conn);

Oracle 9.i under RedHat 9, php 5.00 and 5.01(same), any Apache 2 version.

Everything fine on same server when using PHP 4.3x

It is clearly a bug ! And we are quite a lot to report it !
 [2004-09-01 02:51 UTC] cnichols at nmu dot edu
Same problem over here. Running PHP 5.0.1 with Apache2 and Oracle 10g. I found a site saying that errmsg has to do with a soon-to-expire password, but I doubt that's the case for all of you :)
 [2004-09-01 10:40 UTC] marcus dot schuelke at juj dot de
This Bug is caused by PHP 5
to fix the problem use 

oci_new_connect ( username,password, db)
instead of ocilogon();

hope that will fix your problem..
 [2004-09-09 15:10 UTC] artmotion at nurfuerspam dot de
oci_new_connect did the job!
One of those things that must be documented much better and brought to the developer's attention.
 [2004-12-14 16:26 UTC] niall at mcphillips dot net
PHP5.0.2 / Apache 1.3.33 / Oracle 9.2.0.5 / RHES 3.0

Both oci_connect and ocilogin fail with:

Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-24324: service handle not initialized in /www/htdocs/oratest.php on line 8

oci_new_connect works but appears to force a new connection each time (overhead?).

Is this a bug?
 [2006-03-14 09:47 UTC] phandangthai at yahoo dot com
When I use Windows server 2003, Standard Edition, Oci8 worked, but when I use the Enterprise version, I have the same problem, even if I use the latest stable php 5.1.2. But when I use the latest snap shot at
http://snaps.php.net/win32/php5.1-win32-200603140730.zip
(I'm not sure, it works currently, because, that changes frequenly, but you should download the last version from snap shot page). And Oci8 works fine
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC