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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another CGI error

Status
Not open for further replies.

mover50

Programmer
Joined
Aug 3, 2004
Messages
77
Location
US


I get this error....

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, Sponge.
at C:\Inetpub\scripts\14-05.pl line 4


Running this perl (not complete)

#!C:perl/bin/

use DBI;
$dbhandle = DBI->connect("dbi:ODBC:address");

$sqlstatement="SELECT firstname, lastname FROM addresstable";


I do a search/find and get these results

ODBC.pm C:\Per\site\lib\Win32
ODBC.pm C"|Perl\site\lib\DBI\Const\Getinfo

Here is the path in AUTOEXEC.BAT


C:\>path
PATH=C:\PERL\BIN\;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\MICROS~3\OFFICE;C:\;
C:\BAT;C:\PROGRA~1\BORLAND\COMMON~1\BDE;D:\MSSQL7\BINN;C:\PROGRA~1\MTS

Any help would be most appreciated.
Thanks,

Kent (the worrier)
 
Try reinstalling DBD::ODBC

command line
ppm install DBD::ODBC

on Activestate

HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
I can enter the ppm install DBD::ODBC

after that I get a blinking cursor and no echo or action when I enter the on Activestate.

Kent (the worrier)
 
Are you connected to internet?! :)
... coz you need it! :)

And you should also install the DBI module... can't remember the full name.
 
Also, if you happen to be accessing the internet through a proxy server, check the section in the perl documentation on using PPM. I had to create an environment variable in Windows to get it to work
 
nag2 asked if I was connected to the internet.

I was conncected when I ran the perl program, if I was not connected I would have gotten another error. Do you mean was I connected when I did the DBD::ODBC install?

I need more specifics on how install DBI or to determine if DBI is installed. I know ppm is installed.

I can access my database using ADO (ActiveX Data Objects), but not DBI. Is this supposed to be on CPAN?

Thanks,

Kent (the worrier)
 
DBI can be founded on CPAN but has to be installed. I don't think it's install by default.

And the error you got:
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
... is typical of some problem during install or import of a file.

Let me check... I have one example of accessing database somewhere... I'll try to tell you how I did it! :)
 
...but the good point is that you were very precise and gave lots of information! :)
 
Euh... I tested it and they really is a problem with the installation of DBD::ODBC...
Same symptoms as morover50... Quite strange... never had this problem with any other module.

:(
 
naq2.,

Are you saying that I may have DBI but it somehow was not installed correctly or maybe something is wrong with the install?
The only thing I remember installing is the Activestate perl package and nothing else.
Do I also need to download and install DBI?

Did you use the CPAN DBI install?

Thanks for checking this out.

Kent (the worrier)
 
You can try installing the DBD::ODBC module manually -

Go to this page and select your perl version (5xx, 6xx, or 8xx)

download and extract DBD-ODBC.zip to any directory

from the command prompt, navigate to the directory you extracted it to and enter:

>ppm install DBD-ODBC.ppm

The only thing is that I don't think it will download any dependencies if you're installing a module this way. It's worth a shot though - you may not need any for this particular module, or you may already have them. If it installs successfully, and you get a different error message when you run the script, just repeat the procedure for the modules it tells you it can't find.

I did a search for ODBC.pm on my pc, and I have one in C:\Perl\site\lib\DBD as well as the two locations you mentioned.
 
Learn to love CPAN
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
>ppm install DBD-ODBC.ppm

When I do this step, the title bar in the command window changes from MS-DOS Prompt to Perl, but nothing happens. I gave it 15 mins. All I get is a blinking cursor, no echo when I enter anything. The command window seems dead and the only way I can close it is do an alt-ctrl-del and then end the Perl task.

Thanks,

Kent (the worrier)
 
It's been a while since I installed a module on a Windows box but I think you install them from a perl command line, not a DOS command line.

There's always a better way. The fun is trying to find it!
 
Well,
I feel like I have tried everything. Guess it will be another one of those perl things I have to do without until I understand it more.

Perl is bigger than the cosmos, takes an eternity to understand, and is twice as complex as two parallel universes.
And that's if you have a Unix background.

Thanks and regards,



Kent (the worrier)
 
Don't give up just yet...
Besides my typo - should have been DBD-ODBC.ppd (not .ppm), the DBD-ODBC.zip file for ActivePerl 5.8 contains no tar/gzip file. I don't know why.. maybe because it's the latest version and a package hasn't been developed yet? Normally, PPM automatically extracts the resources from the gzip and places them in the appropriate perl directories.
Assuming you're using v5.8, try the same thing with this version, then follow the same procedure. (the ppd filename is the same)

I'm pretty sure that will work.. using the CPAN shell is another option for installing modules, but it can be kind of a pain in windows, and you'll need a C compiler for this module if you don't already have one.

Hope that helps..
 
Let's go back a step.
It seems to me that my ppm is not working properly. When I enter anything with the ppm command or just ppm itself, nothing happens. How do I know if I have ppm installed and how do I know if it is working properly?
What do I need to do to install it? Where can I find something on ppm?
I want to make sure that my ppm is working.

Thanks for the help. My ppm may not be working but at least I am learning a few more things about the cosmos.

BTW I do not have a c compiler.

Kent (the worrier)
 
This happened me the other night when this thread came in

I started the ppm install, and went off for a few pints, and when I cam back it was installed

Could be timing

--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top