Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ if test "$PHP_PDO_OCI" != "no"; then
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
PHP_ADD_LIBPATH($PDO_OCI_LIB_DIR, PDO_OCI_SHARED_LIBADD)

PHP_CHECK_LIBRARY(clntsh, OCIEnvNlsCreate,
[
AC_DEFINE(HAVE_OCIENVNLSCREATE,1,[ ])
], [], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])

PHP_CHECK_PDO_INCLUDES

PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
Expand Down
3 changes: 2 additions & 1 deletion oci_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ *
H->prefetch = PDO_OCI_PREFETCH_DEFAULT;

/* allocate an environment */
#ifdef HAVE_OCIENVNLSCREATE
if (vars[0].optval) {
H->charset = OCINlsCharSetNameToId(pdo_oci_Env, (const oratext *)vars[0].optval);
if (!H->charset) {
Expand All @@ -754,7 +755,7 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ *
}
}
}

#endif
if (H->env == NULL) {
/* use the global environment */
H->env = pdo_oci_Env;
Expand Down