installed PHP5 and OCI8 on openSUSE 13.1 works fine so far. When trying to run *.php on my Apache to connect to oracle databases via tnsnames.ora file, I'm getting ORA-12154. When I add the line
putenv("TNS_ADMIN=/usr/lib/oracle/12.1/client");
everything works. I looked into phpinfo() and got 3 machtes when searching for TNS_ADMIN:
APACHE ENVIRONMENT: TNS_ADMIN /usr/lib/oracle/12.1/client
PHP VARIABLES: _SERVER["TNS_ADMIN"] /usr/lib/oracle/12.1/client
APACHE ENVIRONMENT: TNS_ADMIN /usr/lib/oracle/12.1/client
(Yeah I got Apache Environment 2 times, on my phpinfo(), dunno if this is correct.)
Can someone help me getting PHP to use this variable ... I don't wanna use the putenv command in every script ... when using php script.php locally on the machine I got no probs and I don't have to set this TNS_ADMIN ... weird, I think ...
Any ideas?