php.net |  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
Description:
------------
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: 1.269.2.16.2.38.2.20 $
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
oci8.events => 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');


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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 pecl.php.net.

In case this was a pecl.php.net 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:
http://cvs.php.net/viewvc.cgi/pecl/oci8/oci8.c?r1=1.269.2.16.2.38.2.29&r2=1.269.2.16.2.38.2.30
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 09:01:45 2014 UTC