Topic: oci_connect(): OCIEnvNlsCreate() failed
Hi
I have installed php 8.3, oracle client 19.3. OCI8 module ie enabled and when checked if OCI_CONNECT() exists it is true.
But on trying to connect it throws error :
oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in
oci_connect(): Error while trying to retrieve text for error ORA-01804 in
Am missing the environment variables LD_LIBRARY_PATH, ORACLE_HOME,TNS_ADMIN in the phpinfo() page.
Tried setting in etc->sysconfig->httpd but it is not reflecting.
Tried setting using systemctl edit php-fpm
[Service]
Environment=LD_LIBRARY_PATH=/opt/ora/19c/client/lib
Environment=ORACLE_HOME=/opt/ora/19c/client
Environment=TNS_ADMIN=/opt/ora/19c/client/network/admin
I dont know if this is a problem but on running the command ldconfig --- ldconfig: /opt/ora/19c/client/lib/libexpat.so.1 is not a symbolic link
Still not working.. Where I have to set these variables so that php or apache can utilize it.