putenv() doesn't seem to work!! Groan!

From: Date: Thu, 29 Mar 2001 14:57:57 +0000
Subject: putenv() doesn't seem to work!! Groan!
Groups: php.db 
Request: Send a blank email to php-db+get-7990@lists.php.net to get a copy of this message
Hi! I'm using PHP4, iODBC & OpenLink for the database connection and communication. After installing the iODBC (driver manager) & OpenLink (driver), fix up the odbc.ini (part of iODBC or OpenLink) and did the odbctest. The test passed and it connect the linux to the MS-SQL Server and I was able to execute the SQL command without a problem. Now come the next part, website database connection. I wrote the script for the odbc connection, it doesn't work. I got the error message. ================================================================ "Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host, SQL state 08004 in SQLConnect in /home/website/test.php on line 15 Can not connect to DSN: Server --> Test_CMS" ================================================================ It look like that PHP can't set the environment variable or put in the environment variable. The script I wrote down is .... putenv("LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH"); putenv("ODBCINSTINI=/usr/local/bin/odbcinst.ini"); putenv("ODBCINI=/usr/local/bin/odbc.ini"); Why does the PHP environment varible doesn't work? What can I do about it? Thanks, Scott

« previous php.db (#7990) next »