|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58569 oci_connect with character set and without ORACLE_HOME defined causes segfault
Submitted: 2009-03-01 10:44 UTC Modified: 2009-03-11 12:14 UTC
From: will at flourishlib dot com Assigned: sixd
Status: Closed Package: oci8 (PECL)
PHP Version: 5.2.4 OS: Ubuntu 7.10
Private report: No CVE-ID:
 [2009-03-01 10:44 UTC] will at flourishlib dot com
When I try to connect to a local Oracle 10g XE instance with oci_connect() I get a segfault. I found that I didn't have ORACLE_HOME set, however if I specify the character set UTF8, PHP segfaults. If I don't specify the character set, I get a warning about the environmental variable not being set.

OCI8 Support => enabled
Version => 1.3.4
Revision => $Revision: $
Active Persistent Connections => 0
Active Connections => 0
Compile-time ORACLE_HOME =>
Libraries Used =>
Temporary Lob support => enabled
Collections support => enabled

Directive => Local Value => Master Value
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100 => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20

Reproduce code:
oci_connect('username', 'password', 'localhost/XE', 'UTF8');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-01 22:22 UTC] christopher dot jones at oracle dot com
Call to php_oci_init_global_handles should check that OCI_G(env) is not null before continuing
 [2009-03-09 14:04 UTC] christopher dot jones at oracle dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.


Fix merged to CVS.  Will be released in a (future) PECL OCI8 1.3.5.

The bug affected OCI8 when compiled with an ORACLE_HOME (not an Oracle Instant Client).

Not all cases of ORACLE_HOME being unset will be protected by the fix: don't do putenv('ORACLE_HOME=""') in a script.
 [2009-03-11 12:14 UTC] christopher dot jones at oracle dot com
Patched file is:
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 06:02:02 2015 UTC