Page 1 of 1

Tip with CGI and ODBC driver

Posted: Wed Jul 28, 2010 3:42 pm
by bangkok
I have 1 My SQL server and 1 MS SQL server on my local network

-I can access both of them from a RunRev stack or standalone using the MySQL driver for the first and the ODBC driver for the second

-I can access the MySQL server from a RunRev CGI (as described here :
http://forums.runrev.com/phpBB2/viewtop ... 755#p21119

-But I can't access the MS SQL server from a RunRev CGI
Error message : [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et nom de pilote non spécifié
Can't find the datasource.

But the very same datasource works very well with a RunRev stack or a RunRev standalone. So why not with RunRev CGI ?

Eventually I found the cause : my original datasource was a "user datasource". I created a new one, but as "system datasource" and then bingo, it worked with a CGI.

I can't explain why a RunRev stack or standalone is okay with a "user datasource", when a CGI needs a "system datasource" with the ODBC driver.

Re: Tip with CGI and ODBC driver

Posted: Thu Jul 29, 2010 5:38 am
by Janschenkel
In nearly all configurations, the cgi is executed as a different user on the computer - for security reasons, it is preferred that this user has limited privileges for a confined space (to avoid that a web surfer can find his way into documents you didn't want to share or change configuration data). So the ODBC DSN haqs to be defined either as a System DSN or as a User DSN for that specific web server user.

Jan Schenkel.

Re: Tip with CGI and ODBC driver

Posted: Thu Jul 29, 2010 7:00 am
by bangkok
Janschenkel wrote:In nearly all configurations, the cgi is executed as a different user on the computer - for security reasons, it is preferred that this user has limited privileges for a confined space (to avoid that a web surfer can find his way into documents you didn't want to share or change configuration data). So the ODBC DSN haqs to be defined either as a System DSN or as a User DSN for that specific web server user.
Seems logical. Thanks.

Although, the access to my MySQL server is okay with the CGI and a simple user DSN.