PHP runs in the sandbox of the HTTP apache server, but I don't think it inherits all of its Env variables... At any rate, the answer you probably want is: <?php setEnv('ORACLE_HOME', '/whatever/your/oracle/home/dir/is');?> NOTE: I began as "the answer guy" on this mailing list back when I realized that the dude answering this same dang ORACLE_HOME question every week was the same dude that could be fixing/adding PHP code to make PHP better (Rasmus Lerdorf) instead of answering this same question every week. Back then, I had no idea what this setEnv thingie did, or what ORACLE_HOME was all about -- I just parrotted back the answer, as it hadn't changed in 6 months. :-) Thank you for this nostalgic reminder of how I became arguably "famous" in PHP. :-) I'm also betting that you could find this answer in the mailing list archives, the PHP FAQ and at http://php.net/oci Just guessing. On Fri, March 9, 2007 4:12 am, sirakov wrote: > > Hi, > I have a problem with oci8. I installed ORACLE Enterprise with php5 > and > apache, with this script : > > <?php phpinfo(); ?> > > I receive information for the set modules. I see that oci8 is enabled > however ORACLE_HOME is empty. Additionally, I tried to write a little > script > which I run as a root. Due to this script, I set variables and start > apache: > > cmd=`which apache2ctl` > $cmd stop > ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1;export > ORACLE_HOME > echo ORACLE_HOME: $ORACLE_HOME > ORACLE_SID=orcl; export ORACLE_SID > echo ORACLE_SID: $ORACLE_SID > ORATAB=/etc/oratab; export ORATAB > echo ORATAB: $ORATAB > ORACLE_HOME_LISTNER=$ORACLE_BASE, export ORACLE_HOME_LISTNER > echo ORACLE_HOME_LISTNER: $ORACLE_HOME_LISTNER > ORACLE_BASE=$ORACLE_HOME; export ORACLE_BASE > echo ORACLE_BASE: $ORACLE_BASE > NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15; export NLS_LANG > echo NLS_LANG: $NLS_LANG > LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH > echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH > LD_PRELOAD=/u01/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so > echo LD_PRELOAD:$LD_PRELOAD > $cmd start > > In /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini I set the > extension=oci8.sо, but ORACLE_HOME is still empty (see here > http://www.picvalley.net/u/9/8466_726.PNG) > > If someone has an idea how to solve the problem, I will highly > appreciate > any advices with this regard. I read about an installation of ORACLE > Instant > client and oci8 but I do not know whether I need this instant client > at all, > because I use Oracle Enterprise. > > PS. i'm sorry for the bad english, i can't explain the problem better. > -- > View this message in context: > http://www.nabble.com/php%2C-oci8-and-oracle-tf3374589.html#a9390900 > Sent from the PHP - General mailing list archive at Nabble.com. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php