|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29444 Crash attemping to connect Oracle via oci8 when database is not mounted
Submitted: 2004-07-29 15:12 UTC Modified: 2004-08-25 01:00 UTC
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:3 (75.0%)
From: oguilloux at sopragroup dot com Assigned: tony2001 (profile)
Status: No Feedback Package: OCI8 related
PHP Version: 5.0.0 OS: Windows 2000 SP4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-07-29 15:12 UTC] oguilloux at sopragroup dot com
Using oci8 extention for connecting Oracle Database crash PHP (with and without Apache) when SID isn't found.

I'm working with PHP 5 (13 july version), Win 2K SP4. My oracle client is 8.1.7 and I wish connected to a Oracle database. In PHP4, I had no problems in oci8, but now, PHP crash.

The SOLUTION is to use oracle extention which work even if database has some trouble.

In my PHP.INI, I use :

Reproduce code:
$argDatabasename = 'PNGRS24';

// BUT with ORACLE_LOGON() (not oci8) it's work !

Expected result:
That oci8 does work as well as oracle extention in PHP 5

Actual result:

FOR APACHE 1.3.29 / PHP5
Application popup?: apache.exe - Erreur d'application?: L'instruction ? "0x01822456" emploie l'adresse memoire "0x00000008". La memoire ne peut pas etre "read".

WITH PHP5 logs
PHP Warning:  ociplogon() [<a href='function.ociplogon'>function.ociplogon</a>]: _oci_open_server: ORA-12514: TNS : le listener n'a pas pu resoudre le SERVICE_NAME figurant dans le descripteur de connexion in c:\work\WEB\LookSGBD.php on line 31.

My debugger tell me that it's crashed on php_oci8.dll at this code line (stack):
01492456  cmp         dword ptr [eax+8],2 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-29 15:24 UTC]
>My oracle client is 8.1.7 and I wish connected to a Oracle database.
That's weird and can be the reason.
Try to update your client - I can't reproduce this under WIn2k, Oracle
 [2004-07-29 15:33 UTC] oguilloux at sopragroup dot com
Thank's !

sorry, but why it works with oci8/PHP4 and not with oci8/PHP5 ? I don't believe that the cause is my Oracle client. I often do EXP, IMP and SQLPLUS with my oracle 8 on oracle 9 database without any troubles.

I restore my config to works with PHP4/oci8 and my web site works without any problem. The only change was to reconfig apache to use PHP4.

The more strange feature is that PHP5/oracle extention works better than oci8.

Have you another suggestion to try ?
Thank's !
 [2004-07-29 16:01 UTC]
Yes, probably other suggestions will appear when I can reproduce it myself.
ATM I can see only predictable warning and nothing more.
 [2004-07-29 17:53 UTC] oguilloux at sopragroup dot com
There's a strange stuff : If I only use, the function oci8 "oci_logon" even if the database is not connected, it's works. But when I combine pure oci8 functions with ADO-DB ( for PHP (which is useful to be database independant).
I use the "version V3.00 6 Jan 2003" of PHP AdoDB. May be, with the new Object feature, it could be create some problems ? The most strange thing is that "oracle" functions work good.
I have tested the AdoDB 4.51 for PHP, but PHP still crash.
 [2004-08-03 02:12 UTC] cjbj at hotmail dot com
Can the filer give a better testcase?  Does the DB have to
be unmounted?  Does ADOdb have to be used?
 [2004-08-03 15:41 UTC] oguilloux at sopragroup dot com
With this code (below) only, my PHP5 (cli version) doesn't terminate properly. (The program did not finish, it seem to wait about something that never happens).

=> It's seem to be "OCIParse" which doesn't work. When I use comments on this line code, the script finish and not when I use the command.

$argDatabasename = 'PNGRS24';
$cn = OCILogon('SYSTEM','MANAGER', $todo);
$stmt = OCIParse($cn,"select * from cols");
$res = OCIExecute($stmt);
 [2004-08-13 17:43 UTC]
Please try using this CVS snapshot:
For Windows:

 [2004-08-16 09:47 UTC] oguilloux at sopragroup dot com
Thank's ! It's work well now with the new distribution on my "crash" script test (using OCIParse function). But, when I use my real PHP site using "AdoDB for PHP" to connect to Oracle with oci8, it's still crash PHP.exe. I will look about it and search why and where it crashed.
 [2004-08-17 07:39 UTC]
Feel free to mark this bug as Open, when you get any additional info about it. Thanks.
 [2004-08-25 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".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 05:01:35 2024 UTC