Re: Env Var ???? (With iODBC vs MS-SQL instead of DB2)

From: Date: Fri, 28 Sep 2001 19:33:09 +0000
Subject: Re: Env Var ???? (With iODBC vs MS-SQL instead of DB2)
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-12828@lists.php.net to get a copy of this message
> 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. The DSN in odbc.ini is working properly because when I did the odbctest through the AIX terminal, it worked beautifully. So, I have no doubt the DSN is a problem through the website's PHP. The Env Var seem to work properly since it is a similar replica of the one from the Linux machine. You mentioned about the "phpinfo()" so I checked it out. I have no idea of what it look like if it have iodbc included. So, I compare the "phpinfo()" from this AIX machine to the one from Linux. The one on linux showed the "odbc" section with detail info and it include the "iodbc" in the "ODBC library". So, I checked it out with the AIX one, it only showed the "db2". So, you may be on the right track. I'm going to have to recompile it again. How do I recompile PHP to recognize the iODBC? It doesn't work this time when I did that. I'll try removing hte PHP directory and start a fresh copy to see if that will work. (any advice is appreciated) ---------------------------------------------------------------------------- --------------------------- > 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? --clip begin-- Warning: SQL error: [IBM][CLI Driver] SQL1001N "LIVE_DP_KB_1" is not a valid database name. SQLSTATE=2E000 , SQL state S1501 in SQLConnect in /home/website/test/www/index.php on line 38 --clip end-- I looked it up on the website for specific information about the SQL Error Code to find out what it meant. On the website, it said DB2. It also said that "SQL1001N" refer to the word "Live_DP_KB_1" as more than 1 to 7 characters. That was odd, so I renamed it to "DP_KB_1" which fall in between 1 to 7 characters. This is where I get another error message --> --clip begin-- Warning: SQL error: [IBM][CLI Driver] SQL1013N The database alias name or database name "DP_KB_1" could not be found. SQLSTATE=42705 , SQL state 08001 in SQLConnect in /home/website/test/www/index.php on line 36 --clip end-- Since I have DB2 on the same machine as the iODBC Driver manager is on. So, I knew the PHP is pointing to DB2. So, I type in the database name, username and password in the script that is part of the database in DB2 and I got the database result from it. So, PHP was really communicating with DB2 on this machine. Thanks, Scott

« previous php.db (#12828) next »