php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65687 oci_connect() fails with "segmentation fault" signal
Submitted: 2013-09-17 10:15 UTC Modified: 2016-03-08 00:58 UTC
From: grig-siren at rambler dot ru Assigned: sixd (profile)
Status: Duplicate Package: OCI8 related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2013-09-17 10:15 UTC] grig-siren at rambler dot ru
Description:
------------
I have tried to connect to Oracle database after user's password has expired. And result was: failure of PHP with message "child pid ... exit signal Segmentation fault(11)" in '/var/log/httpd/error_log' file.
Then I asked Oracle DBA to modify user's profile and set password life time to "unlimited" - and after that all my scripts again work correctly.

As I understand, the reason of such situation is warning message about password expiration issued by database during connection process. I think, this message is a big surprise for function oci_connect().


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-17 21:47 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2013-09-17 21:47 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2013-09-18 06:21 UTC] grig-siren at rambler dot ru
-Status: Feedback +Status: Open
 [2013-09-18 06:21 UTC] grig-siren at rambler dot ru
Sorry, but I can't do so. To do so I need DBA access rights to Oracle to restore user's password life time and make this password expired. But I don't have such rights.
But I'm sure the problem is located inside oci_connect() call and execution. To locate it I have put debugging trigger_error() calls in my script in different places. And when I put trigger_error() call just before call to oci_connect() and another just after it - then I have got 'before' print in '/var/log/httpd/error_log' and fauilure message just after it.

BTW, when I tried to connect to the same database with another tools (such as SQLDeveloper or SQL*Plus), I have got message ORA-2800x (sorry, I don't remember the last digit). I think, oci_connect() receives the same message, but don't expect it, and that's the reason of failure.
 [2013-09-23 15:17 UTC] sixd@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: sixd
 [2013-09-23 15:17 UTC] sixd@php.net
What would be most useful is version numbers of PHP OCI8, the Oracle client 
libraries and the Oracle database.

I thought this crash was fixed long ago. See bugs like 
https://bugs.php.net/bug.php?id=58477 and https://bugs.php.net/bug.php?id=59896
 [2013-09-24 08:35 UTC] grig-siren at rambler dot ru
-Status: Feedback +Status: Assigned
 [2013-09-24 08:35 UTC] grig-siren at rambler dot ru
Bug report #58477 looks like something similar. But I use PHP 5.3.3.

The following is from my phpinfo() result:
OCI8 Support 	enabled
Version 	1.4.5
Revision 	$Revision: 305257 $
Oracle Instant Client Version 	10.2
 [2013-09-27 04:10 UTC] sixd@php.net
-Status: Assigned +Status: Duplicate
 [2013-09-27 04:10 UTC] sixd@php.net
Upgrade. I believe this will solve your issues.
 [2016-03-08 00:58 UTC] sixd@php.net
-Package: Oracle related +Package: OCI8 related
 [2020-10-01 16:35 UTC] bruch at brause dot de
Actually, I just had exactly this in cli php 7.2 with oci8.

PHPStorm got this right after connect:
[2020-10-01 14:50:08] [99999][28011] ORA-28011: Account läuft bald ab; ändern Sie Ihr Kennwort jetzt

One needs to unset the time limit on the oracle account AND reset the password. Otherwise it will still show the message and crash with segmentation fault(core dumped).
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Nov 29 06:03:14 2021 UTC