Oci_connect () works with terminal but not in apache environment

I recently installed and switched on for the expansion oci8 PHP 5.6

and use Apache 2.4.10

on CentOS 6.4

64-bit using httpd, httpd-devel, php56w-* and mysql

. At the time, I was using the latest Instant Client (12.1) and followed the instruction on the Oracle website, used the options pecl install oci8

and phpize

during installation oci8 2.0.8

, setting the environment variables for the shell and Apache pointing modules/oci8.so

to php.d/oci8.ini

.

The problem is that I can call oci_connect()

with php in the terminal like php oci_test.php

it works fine, but when I try to run it from the browser it returns Fatal error: Call to undefined function oci_connect()

. I already read this solution but it didn't work and both LD_LIBRARY_PATH and ORACLE_HOME are set correctly in both shell and httpd and php. (I intend to use yajra for oci for laravel, so it doesn't use connection strings and doesn't generate it dynamically, so it doesn't need TNS_ADMIN files or any .ora files)

It works fine on my other environment, which is Windows based XAMPP based Apache, manually updated to Apache 2.4.10 (64 ts vc11) and PHP 5.6 (64) using php_oci8_12c.dll provided by oracle.

+3
linux oracle php apache oci


source to share


No one has answered this question yet

See similar questions:

6
oci_connect () only works from the command line

or similar:

2335
Removing an element from an array in PHP
1906
How does PHP foreach work?
988
How can I remove the exported environment variable?
2
Reset Apache PATH environment variable on Windows
1
OCI8 - oci_connect fails if not set TNS_ADMIN environment variables in script
1
Stuck calling undefined function oci_connect () with XAMPP
1
"Warning: oci_connect (): OCIEnvNlsCreate () failed" and "Warning: oci_connect (): Failed while trying to get text for ORA-01804 error"
0
Laravel 5.6 OCI works fine with "php artisan serve", but Nginx cannot find oci_connect ()
0
Oci_connect warning when connecting to oracle database with php
0
oci_connect () only works on cli



All Articles
Loading...
X
Show
Funny
Dev
Pics