RE: Perl DBI Urgent
- From: Sanjay.Tripathi@xxxxxxxxx (Sanjay Tripathi)
- Date: Wed, 28 Mar 2007 20:07:09 +0530
Matt,
One more interesting thing let me tell you!!
When I'm moving to the directory where my DBI.pm and after then if I m
running that same script, the output is different, see below
# cd ~/DBI/DBI-1.48/
# ls
# ls
Changes dbipport.h dbi_sql.h DBIXS.h ex
MANIFEST README test.pl
dbd_xsh.h dbiprof.PL dbivport.h Driver.xst lib
META.yml Roadmap.pod ToDo
DBI.pm dbiproxy.PL DBI.xs Driver_xst.h Makefile.PL
Perl.xs t typemap
#perl sanjay_test.pl
Can't locate loadable object for module DBI in @INC (@INC contains:
/heb/appl/ewa/DBI/DBI-1.48 /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
255
BEGIN failed--compilation aborted at DBI.pm line 255.
Compilation failed in require at /app/w3/steve/sanjay_test.pl line 3.
BEGIN failed--compilation aborted at /app/w3/steve/sanjay_test.pl line
3.
------------------------------------------------------------------------
----
As ooutput says that error/problem at line 255 of DBI.pm, Please see
below
The lines of DBI.pm
---------------------------------- See Below the lines of DBI.pm
-----------
227 utils => [ qw(
228 neat neat_list $neat_maxlen dump_results
looks_like_number
229 data_string_diff data_string_desc data_diff
230 ) ],
231 profile => [ qw(
232 dbi_profile dbi_profile_merge dbi_time
233 ) ], # notionally "in" DBI::Profile and normally imported
from there
234 );
235
236 $DBI::dbi_debug = 0;
237 $DBI::neat_maxlen = 400;
238
239 # If you get an error here like "Can't find loadable object ..."
240 # then you haven't installed the DBI correctly. Read the README
241 # then install it again.
242 if ( $ENV{DBI_PUREPERL} ) {
243 eval { bootstrap DBI } if $ENV{DBI_PUREPERL} == 1;
244 require DBI::PurePerl if $@ or $ENV{DBI_PUREPERL} >= 2;
245 $DBI::PurePerl ||= 0; # just to silence "only used once"
warnings
246 }
247 else {
248 bootstrap DBI;
249 }
250
251 $EXPORT_TAGS{preparse_flags} = [ grep { /^DBIpp_\w\w_/ } keys
%{__PACKAGE__."::"} ];
252
253 Exporter::export_ok_tags(keys %EXPORT_TAGS);
254
255 }
256
257 # Alias some handle methods to also be DBI class methods
258 for (qw(trace_msg set_err parse_trace_flag parse_trace_flags)) {
259 no strict;
260 *$_ = \&{"DBD::_::common::$_"};
261 }
262
263 use strict;
264
265 DBI->trace(split /=/, $ENV{DBI_TRACE}, 2) if $ENV{DBI_TRACE};
266
267 $DBI::connect_via = "connect";
268
269 # check if user wants a persistent database connection ( Apache
+ mod_perl )
------------------------------------------------------------------------
-
Any Idea or clue OOOO
~~~Sanjay Tripathi ~~~
-----Original Message-----
From: Sanjay Tripathi
Sent: Wednesday, March 28, 2007 7:47 PM
To: 'Matthew Ramadanovic'; Satya Shiv Mohanty
Cc: dbi-users@xxxxxxxx
Subject: RE: Perl DBI Urgent
Matt,
As your suggestion, I did like that
root@sys # vi sanjay_test.pl
"sanjay_test.pl" [New file]
#!/usr/bin/perl
eval {
use DBI;
};
if ($@) {
print "Couldn't use DBI : $@\n";
} else {
print "Loaded DBI successfully\n";
}
eval {
use DBD::Oracle;
};
if ($@) {
print "Couldn't use DBD::ORACLE : $@\n"; } else { print "Loaded
DBD::Oracle successfully\n"; } print "Done\n";
root@sys # 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.
root@sys #
Still I'm facing same problem any Idea :)
Thanks
Sanjay Tripathi
-----Original Message-----
From: Matthew Ramadanovic [mailto:matthew.ramadanovic@xxxxxxxx]
Sent: Wednesday, March 28, 2007 7:26 PM
To: Sanjay Tripathi; Satya Shiv Mohanty
Cc: dbi-users@xxxxxxxx
Subject: RE: Perl DBI Urgent
Why not just do something like this:
#!/usr/bin/perl
eval {
use DBI;
};
if ($@) {
print "Couldn't use DBI : $@\n";
} else {
print "Loaded DBI successfully\n";
}
eval {
use DBD::Oracle;
};
if ($@) {
print "Couldn't use DBD::ORACLE : $@\n";
} else {
print "Loaded DBD::Oracle successfully\n";
}
print "Done\n";
-Matt
-----Original Message-----
From: Sanjay Tripathi [mailto:Sanjay.Tripathi@xxxxxxxxx]
Sent: Wednesday, March 28, 2007 9:13 AM
To: Satya Shiv Mohanty
Cc: dbi-users@xxxxxxxx
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:Satya_Mohanty@xxxxxxxxxxx]
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:Sanjay.Tripathi@xxxxxxxxx]
Sent: Tuesday, March 27, 2007 5:41 PM
To: dbi-users@xxxxxxxx
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
root@sys # 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***
.
- Prev by Date: RE: Perl DBI Urgent
- Next by Date: RE: Perl DBI Urgent
- Previous by thread: RE: Perl DBI Urgent
- Index(es):
Relevant Pages
|
|