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)
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.
-------------
Reporter | ||
Comment 1•26 years ago
|
||
/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';
------------
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•26 years ago
|
||
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?
Reporter | ||
Comment 3•26 years ago
|
||
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
Reporter | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•26 years ago
|
||
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.";
}
}
Assignee | ||
Comment 5•26 years ago
|
||
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.
Comment 7•23 years ago
|
||
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
QA Contact: matty
Target Milestone: --- → Bugzilla old
Version: other → unspecified
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•