Re: [PHP] RE: SQL state S1090: Almost connected to mysql via PHP/odbc

2001-12-02 Thread mweb

On Sunday 02 December 2001 23:18, Venu wrote:

> > in themysql monitor. It *shows* when I run isql -v m97.
> >  I have modified /etc/odbc.ini and /etc/odbcinst.ini and /etc/odbc.ini as

> The problem is that, unixODBC is not able to find your MyODBC
> DSN entry. This is probably due to the fact that it is not picking
> the right odbc.ini file.
> Did you tried by using isql -v m97 to check whether it is
> really picking the .ini or not.

Venu,
I tried, as posted in the original message. Also, I put the complete path to 
the odbc.ini file listing that DSN (see again original post).
There is certainly something wrong with my config files, but I'm checking 
them aginst all the documentation I found so far, and nothing appears.
Any help is appreciated.

mweb

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: SQL state S1090: Almost connected to mysql via PHP/odbc

2001-12-02 Thread Venu

Hi, 

> -Original Message-
> From: mweb [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, December 02, 2001 2:03 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: SQL state S1090: Almost connected to mysql via PHP/odbc
> 
> 
> Hello,
> 
> thanks to the precious suggestions I had on this list some day ago, I have 
> made some progresses, or at least have something new to report.
> I would like to ask now above the error mentioned in the subject, because I
> have not found it inside www.,mysql.com
> 
> I have a database called m97. It *is* listed when I run "show databases" in 
> themysql monitor. It *shows* when I run isql -v m97.
>  I have modified /etc/odbc.ini and /etc/odbcinst.ini and /etc/odbc.ini as 
> follows:
> 
> /etc/odbc.ini
> 
> [m97]
> Trace= On
> TraceFile= stderr
> Driver   = /usr/lib/libmyodbc.so
> DSN  = m97
> SERVER   = localhost 
> USER = test
> PASSWORD = gee
> PORT = 3306 
> OPTIONS = 1
> DATABASE= m97
> SOCKET  = /tmp/mysql.sock
> #
> 
> /etc/odbcinst.ini
> 
> # From the MyODBC package
> [MySQL]
> Description = ODBC for MySQL
> Driver  = /usr/lib/libmyodbc.so
> FileUsage   = 1
> 
> In the PHP file I have:
> putenv("LD_LIBRARY_PATH=/usr/lib/");
> putenv("ODBCINSTINI=/etc/odbcinst.ini");
> putenv("ODBCINI=/etc/odbc.ini");
> $DSN="m97";
>   $cnx = odbc_connect( $DSN , 'test', 'gee' );
> 
> The result in netscape is still:
> 
> Warning: SQL error: [unixODBC][TCX][MyODBC]Invalid DSN specified, SQL state 
> S1090 in SQLConnect in
> /home/mweb/public_html/test.php on line 360
> 

The problem is that, unixODBC is not able to find your MyODBC 
DSN entry. This is probably due to the fact that it is not picking 
the right odbc.ini file.

Did you tried by using isql -v m97 to check whether it is 
really picking the .ini or not.

For more information on howto setup MyODBC, unixODBC and 
MySQL, refer to the following link:
http://lists.mysql.com/cgi-ez/ezmlm-cgi?5:mss:3657:200108:einnhiokafobjmjbmcbm

Regards, Venu
--
For technical support contracts, go to https://order.mysql.com
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Mr. Venu <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/  California, USA
   <___/  www.mysql.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]