I thought you said you are on perl 5.8 not perl 5.6? Looks like Solaris
64 bit (and not on Windows). Either way, DBI is failing so there is no
chance DBD::Oracle will work until you fix that. Fix that first :

If you have more than one perl in your path try calling the one that
does have DBI installed explicitly from your shebang line :

#!/usr/bin/perl 
#!/usr/bin/perl58

If that wasn't it you may have to get more involved :-) :

If you have a c compiler and just need to install perl modules get any
prerequisites (not DBI itself) from CPAN :

perl -MCPAN -e shell o conf prerequisites_policy ask

you can then install modules like this :

install some::module

If elves messed up your cpan configuration (see that a lot) you can
rerun the config script by rerunning the cpan script

Cpan

Once you are in the CPAN shell enter

o conf init

This will kick off the wizard.

You should also make sure your Oracle install is complete for when you
eventually compile DBI and DBD Oracle. Specifically I have found that I
need to have files in my /rdbms/lib and /lib32 directories for DBI to
compile. By default you don't get them in a client oracle install.
Either reinstall and let the universal installer put them there or fetch
them from you database server (which probably has them in /rdbms/lib and
/lib32.

Installing most modules will only work IF you have a C Compiler and
make. Solaris doesn't give you one by default and charge like $4000 for
theirs so . . . 

If you don't have a c compiler or make or some other essential
component, get the pkg-get script http://sunfreeware.com/ and use it to
install them (a free one) :

pkg-get install gcc

I have used gcc on solaris to compile DBI and DBD::Oracle and frankly
had no luck with the $4000 compiler (though I still need it since gcc
won't compile external procedures for oracle but that is another story)

Once you are sure you are using the correct verion of perl, have the
correct Oracle files and libs available, have tools needed to compile
stuff installed, and have all the perl prerequisites installed you can
worry about compiling/installing DBI.

-M


-----Original Message-----
From: Sanjay Tripathi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 10:17 AM
To: Matthew Ramadanovic; Satya Shiv Mohanty
Cc: dbi-users@perl.org
Subject: RE: Perl DBI Urgent

Matt,
      As your suggestion, I did like that

[EMAIL PROTECTED] # vi sanjay_test.pl
"sanjay_test.pl" [New file]
#!/bin/sh
echo DEFANGED.1400
exit
#!/usr/bin/perl
eval {
use DBI;
};
if ($@) {
print "Couldn't use DBI : [EMAIL PROTECTED]";
} else {
print "Loaded DBI successfully\n";
}
eval {
use DBD::Oracle;
};
if ($@) {
print "Couldn't use DBD::ORACLE : [EMAIL PROTECTED]"; } else { print "Loaded
DBD::Oracle successfully\n"; } print "Done\n";

[EMAIL PROTECTED] # perl sanjay_test.pl

Can't locate DBI.pm in @INC (@INC contains:
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at sanjay_test.pl
line 3.
BEGIN failed--compilation aborted at sanjay_test.pl line 3.
[EMAIL PROTECTED] #


Still I'm facing same problem any Idea :)

Thanks
Sanjay Tripathi

-----Original Message-----
From: Matthew Ramadanovic [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 7:26 PM
To: Sanjay Tripathi; Satya Shiv Mohanty
Cc: dbi-users@perl.org
Subject: RE: Perl DBI Urgent

Why not just do something like this:

#!/usr/bin/perl 
eval {
use DBI; 
};
if ($@) {
print "Couldn't use DBI : [EMAIL PROTECTED]";
} else {
print "Loaded DBI successfully\n";
}
eval {
use DBD::Oracle;
};
if ($@) {
print "Couldn't use DBD::ORACLE : [EMAIL PROTECTED]";
} else {
print "Loaded DBD::Oracle successfully\n";
}
print "Done\n";


-Matt


-----Original Message-----
From: Sanjay Tripathi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 28, 2007 9:13 AM
To: Satya Shiv Mohanty
Cc: dbi-users@perl.org
Subject: RE: Perl DBI Urgent

How do I will check that Perl is having DBI and DBD(Oracle) Module or
not!

~~Sanjay~~~

-----Original Message-----
From: Satya Shiv Mohanty [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 8:00 PM
To: Sanjay Tripathi
Subject: RE: Perl DBI Urgent


Probably u did not add the exact location of the DBI.pm in ur script.
Assuming that ur DBI.pm is at /usr/perl5/lib/sun4-solaris/DBI.pm, then u
need to include it using following:-

use lib "/usr/perl5/lib/sun4-solaris";

in ur script.

Also for " Premature end of
script headers" I think u r not mentioning the output type of the
document u r trying to display. Like u use print "Content-type:
text/html\n\n"; for html output.

Hope this helps u.

Regards
Satya Shiv


-----Original Message-----
From: Sanjay Tripathi [mailto:[EMAIL PROTECTED]

Sent: Tuesday, March 27, 2007 5:41 PM
To: dbi-users@perl.org
Subject: Perl DBI Urgent

Hi,

    I getting problem with Perl/Cgi/DBI. Can you guys help me out.




Please see the log below.




Aapche Logs:




Can't locate DBI.pm in @INC (@INC contains: /app/custom/steve/perl
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .
/app/custom/steve/perl /app/custom/perl /heb/appl/ewa/perl/bin/perl) at
/app/w3/steve/cgi/ewa_new_user.cgi line 3.

BEGIN failed--compilation aborted at /app/w3/steve/cgi/ewa_new_user.cgi
line 3.

[Tue Mar 27 06:47:06 2007] [error] [client x.x.x.x] Premature end of
script headers: /app/w3/steve/cgi/ewa_new_user.cgi







Then I tried


[EMAIL PROTECTED] # perl -e 'use DBI; print $DBI::VERSION,"\n";'




Can't locate loadable object for module DBI in @INC (@INC contains:
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at DBI.pm line
254

BEGIN failed--compilation aborted at DBI.pm line 254.

Compilation failed in require at -e line 1.

BEGIN failed--compilation aborted at -e line 1.










Thanks

ST


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Reply via email to