All,
I have several scripts (downloaded) - that have a similar error
for example......
.
perl -w enter_bug.cgi
[Fri Apr 20 07:22:48 2001] enter_bug.cgi: defined(%hash) is deprecated
at CGI.pl line 121.
[Fri Apr 20 07:22:48 2001] enter_bug.cgi: (Maybe you should just
omit the defined()?)
Can't call method "prepare" on an undefined value at
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Mysql.pm line
166 (#1)
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an undefined value.
Something like this will reproduce the error:
$BADREF = undef;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
Content-type: text/html
<H1>Software error:</H1>
<CODE>Can't call method "prepare" on an undefined value at
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Mysql.pm line 166.
</CODE>
<P>
"prepare_error.txt" 41L, 1219C
========================================================
segment of Mysql.pm - line 166 -->
sub query ($$) {
my($self, $statement) = @_;
my $dbh = $self->{'dbh'};
---> my $sth = $dbh->prepare($statement);
if (!$sth) {
$db_errstr = $dbh->errstr();
return undef;
}
$sth->{'PrintError'} = !$Mysql::QUIET;
my $result = $sth->execute();
if (!$result) {
$db_errstr = $sth->errstr();
return undef;
Any help is greatly appreciated!!!!!!!!!!!!
didn't think I'd have to "modify" the mysql.pm file
Lamar (a newbie)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php