Closed Bug 832 Opened 26 years ago Closed 26 years ago

Can't call method "prepare" without a package or object reference error

Categories

(Bugzilla :: Bugzilla-General, defect, P2)

All
Linux
defect

Tracking

()

VERIFIED FIXED
Bugzilla old

People

(Reporter: dyp, Assigned: terry)

Details

Running enter_bug.cgi from webserver get the following line in error.log: -------------- [Thu Sep 17 12:49:53 1998] [error] Premature end of script headers: /home/dyp/ht ml/bugzilla/enter_bug.cgi -------------- When I running it manually I get: -------------- bash-2.02$ ./enter_bug.cgi Can't call method "prepare" without a package or object reference at /usr/lib/perl5/Mysql.pm line 150 (#1) (F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an expression that returns neither an object reference nor a package name. (Perhaps it's null?) 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" without a package or object reference at /usr/ lib/perl5/Mysql.pm line 150. </CODE> <P> Please send mail to this site's webmaster for help. [Thu Sep 17 12:51:47 1998] enter_bug.cgi: Can't call method "prepare" without a package or object reference at /usr/lib/perl5/Mysql.pm line 150. -------------
/usr/lib/perl5/Mysql contains Statement.pm It begins with: -------------- package Mysql::Statement; @Mysql::Statement::ISA = qw(DBI::st); use strict; use vars qw($OPTIMIZE $VERSION $AUTOLOAD); $VERSION = '1.2001'; ------------
Status: NEW → ASSIGNED
Well, my version of Statement.pl says $VERSION = '1.1825'; So, you're using a newer version of stuff than I am. What version of MySQL are you using? Are you sure you have it all installed properly?
I use mysql-3.22.6alpha installed from RPMs. Seems it works correctly. I could not find any error messages in log files... bugzilla successufully connected... I'll try to investigate what changes were made from 1.1825
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Here is the patch which fixes the problem. Only one line :-))))))) Index: globals.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/globals.pl,v retrieving revision 1.3 diff -u -r1.3 globals.pl --- globals.pl 1998/09/17 00:21:07 1.3 +++ globals.pl 1998/09/18 11:56:07 @@ -31,7 +31,7 @@ sub ConnectToDatabase { if (!defined $::db) { - $::db = Mysql->Connect("localhost", "bugs", "bugs", "") + $::db = Mysql->connect("localhost", "bugs") || die "Can't connect to database server."; } }
The database is being reorganized a bit. Instead of the Bugzilla product, a new Webtools product has been created, with Bugzilla being a component of it. This bug is being moved from the old Bugzilla product to the new Webtools product.
Status: RESOLVED → VERIFIED
Verified as fixed with Feb 3 Seamonkey
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
QA Contact: matty
Target Milestone: --- → Bugzilla old
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.