RE: [PHP-DB] Env Var ???? (With iODBC vs MS-SQL instead of DB2)
| From: | Andrew Hill | Date: | Fri, 28 Sep 2001 17:59:29 +0000 |
| Subject: | RE: [PHP-DB] Env Var ???? (With iODBC vs MS-SQL instead of DB2) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12827@lists.php.net to get a copy of this message | ||
Scott,
Ensure (with a phpinfo(); ) that iODBC is actually compiled in.
Also, finding your MSSQL is simply a matter of finding the proper DSN's in
the odbc.ini.
Does the specified /usr/local/odbcsdk/doc/odbc.ini actually contain a DSN
called DP_KB_1 configured to point to MSSQL?
What do you mean that when using PHP it 'points' to DB2? How are you
determining this and are you getting some error message we can see?
Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers
> -----Original Message-----
> From: Scott Fletcher [mailto:scott@abcoa.com]
> Sent: Friday, September 28, 2001 1:07 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Env Var ???? (With iODBC vs MS-SQL instead of DB2)
>
>
> Hi!
>
> I had PHP compilied successfully with the
> "--iodbc=/usr/local/odbcsdk/"
> option. I'm using AIX 4.3.3 and it have IBM DB2 v6.1 on it. I'm using
> apache as well. One of hte website use the db2 which is not a problem. I
> use the other website that point to MS-SQL Server which is a different
> machine. This is where I get interesting problem.
> When I use the odbctest, it work fine without a problem and was able to
> point to the MS-SQL Server. But when I use the PHP, it doesn't point to
> MS-SQL Server, instead it point to DB2 on this machine. How do I make PHP
> get it's attention off of DB2 and instead focus on the MS-SQL
> Server. Could
> the problem be the Env Var?
>
> -- clip begin --
> putenv("LD_LIBRARY_PATH=/usr/local/odbcsdk/lib/oplodbc.so.1");
> putenv("LIBPATH=/usr/local/odbcsdk/lib/oplodbc.so.1");
> putenv("ODBCINSTINI=/usr/local/odbcsdk/doc/odbcinst.ini");
> putenv("ODBCINI=/usr/local/odbcsdk/doc/odbc.ini"); l
>
> $connect=odbc_connect("DP_KB_1","sa","") or
> die("Unable to
> connect to
> Database !!!");
>
> $ask="SELECT * FROM CLIENT WHERE APPLICATION='DP' AND
> ACTIVE='1'";
> $result=odbc_exec($connect,$ask);
>
> @odbc_result_all($result, "BGCOLOR='#FFFFFF' border='1'
> bordercolor='#000000'");
> @odbc_close($connect);
> -- clip end --
>
> Thanks,
> Scott
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>