Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBI/Apache access 1

Status
Not open for further replies.

eve25

Programmer
Feb 9, 2004
32
US
Hi Guys,
I'm hitting a problem I can't solve...
I got CGI scripts working fine in Perl with Windows as long as I don't have any DB access.
Then I am using the DBI and DBD:OCVB (smth like that, a general one supposed to work with any databases) modules, I have configured the ODBC source.
Everything is working fine as long as I use the command prompt to compile the script but not using the browser, the $dbi variable is not define and I got the following line in the Appache error log:
[Tue Oct 26 13:48:42 2004] [error] [client 127.0.0.1] DBI connect('MS Access Database:apache_auth:host=localhost','',...) failed: [Microsoft][Gestionnaire de pilotes ODBC] Source de donn\xe9es introuvable et nom de pilote non sp\xe9cifi\xe9 (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at C:/Program Files/Apache2/cgi-bin/ajoutClient.cgi line 29, referer: I first tried without "apache_auth:host=localhost", and then add it , no change...
I read a little bit about the apache perl_mod thing but I can't get it installed on Windows....

Any idea?
Thanks a lot...
 
Hi eve25,

A few points about your problem:
- Have you defined the ODBC DSN as a SYSTEM DSN (defining it as a USER DSN won't work)?

- Are you able to run a small perl program from the command-line i.e. as a non-CGI script to do a simple select (e.g. count(*) of the rows in any table) on the Access database?

- Does the Web Service User have necessary permissions to access the .MDB (Access database) file?

Please take a look at the following article which gives a good overview:


Best of luck ...
 
Hi ProblemSolver and others...

I don't know you but I sincerely apreciate you already!

I had configured a user DSN, not a system one (I didn't even know it was existing, still a newbie...), so now it works fine!!!!
The link was usefull too! However if it can help someone at some point, the $DSN variable defined in the FAQ part is not required if you configure the ODBC through the Administration tools!...

Thanks so much!
Have a great day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top