Can't use string ("") as a HASH ref while "strict refs" in use at /opt/rt3/share/html/Elements/MyRT line 50, <DATA> line 1662

Hi Guys,

I could really use a hint or any kind of idea what is causing this
error. At the moment, our test instance is useable but not very pretty.
Content doesn’t appear to be laid out correctly, almost as if a table is
badly formed and the columns are running under each other instead of
across the page. Data works so we can log in, insert tickets, modify
data etc, but is not very pretty.

The only thing left to do is to delete our MySQL database and try again
from scratch, but I would prefer not to do that if possible. I believe
this is the same error as I questioned a couple of weeks ago, although
there is now a reference in the error messages.

System:
System Sun Enterprise 4200 16GB RAM
Solaris 9 SPARC
RT VERSION = ‘3.6.3’;
perl, v5.8.4 built for sun4-solaris-stdio
perl -MDBIx::SearchBuilder -e ‘print $DBIx::SearchBuilder::VERSION;’ 1.48
Server version: Apache/1.3.29 (Unix)
Server built: May 27 2004 14:39:39
mod_perl/1.29

We have removed our entire instance and installed fresh files, removing
all our customisations, made sure that our database is patched correctly
from etc/upgrade.

System error

error: Can’t use string (“”) as a HASH ref while “strict refs” in
use at /opt/rt3/share/html/Elements/MyRT line 50, line 1662.
context:

46:
47:
48:


49:
50: % for my $portlet (@{$portlets->{body}}) {
51: <% $show_cb->( $portlet ) %>
52:

53: % }
54:

code stack: /opt/rt3/share/html/Elements/MyRT:50
/opt/rt3/share/html/index.html:79
/opt/rt3/share/html/autohandler:292

raw error http://gplive.uk:3000/index.html#raw

Can’t use string (“”) as a HASH ref while “strict refs” in use at /opt/rt3/share/html/Elements/MyRT line 50, line 1662.

Trace begun at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Exceptions.pm line 131
HTML::Mason::Exceptions::rethrow_exception(‘Can't use string (“”) as a HASH ref while “strict refs” in use at /opt/rt3/share/html/Elements/MyRT line 50, line 1662.^J’) called at /opt/rt3/share/html/Elements/MyRT line 50
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x18b3c20)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef) called at /opt/rt3/share/html/index.html line 79
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x17bab60)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at /opt/rt3/share/html/autohandler line 292
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x17e7afc)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 1069
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x1972fa4)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 134
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x1972fa4)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 792
HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(0x12c3acc)’, ‘Apache=SCALAR(0x14cbd54)’) called at /opt/rt3/bin/webmux.pl line 123
eval {…} at /opt/rt3/bin/webmux.pl line 123
RT::Mason::handler(‘Apache=SCALAR(0x14cbd54)’) called at /dev/null line 0
eval {…} at /dev/null line 0

/usr/local/bin/perl ./sbin/rt-test-dependencies --verbose --with-mysql
perl:
>=5.8.3(5.008004)…found
users:
rt group (rtusers)…found
bin owner (root)…found
libs owner (root)…found
libs group (bin)…found
web owner (rtuser)…found
web group (rtusers)…found
CLI dependencies:
Getopt::Long >=2.24…found
CORE dependencies:
Digest::base…found
Digest::MD5 >=2.27…found
DBI >=1.37…found
Test::Inline…found
Class::ReturnValue >=0.40…found
Date::Format…found
DBIx::SearchBuilder >=1.40…found
Text::Template…found
File::Spec >=0.8…found
HTML::Entities…found
HTML::Scrubber >=0.08…found
Net::Domain…found
Log::Dispatch >=2.0…found
Locale::Maketext >=1.06…found
Locale::Maketext::Lexicon >=0.32…found
Locale::Maketext::Fuzzy…found
MIME::Entity >=5.108…found
Mail::Mailer >=1.57…found
Net::SMTP…found
Text::Wrapper…found
Time::ParseDate…found
Time::HiRes…found
File::Temp…found
Term::ReadKey…found
Text::Autoformat…found
Text::Quoted >=1.3…found
Tree::Simple >=1.04…found
Scalar::Util…found
Module::Versions::Report…found
Cache::Simple::TimedExpiry…found
UNIVERSAL::require…found
Calendar::Simple…found
DEV dependencies:
Regexp::Common…found
Test::Inline…found
Apache::Test…found
HTML::Form…found
HTML::TokeParser…found
WWW::Mechanize…found
Test::WWW::Mechanize >=1.04…found
Module::Refresh >=0.03…found
Test::Expect >=0.30…found
XML::Simple…found
File::Find…found
MAILGATE dependencies:
HTML::TreeBuilder…found
HTML::FormatText…found
Getopt::Long…found
LWP::UserAgent…found
MASON dependencies:
Params::Validate >=0.02…found
Cache::Cache…found
Exception::Class >=1.14…found
HTML::Mason >=1.23…found
MLDBM…found
Errno…found
FreezeThaw…found
Digest::MD5 >=2.27…found
CGI::Cookie >=1.20…found
Storable >=2.08…found
Apache::Session >=1.53…found
XML::RSS >=1.05…found
HTTP::Server::Simple >=0.07…found
HTTP::Server::Simple::Mason >=0.09…found
GD…found
GD::Graph…found
GD::Text…found
Text::WikiFormat >=0.76…found
MYSQL dependencies:
DBD::mysql >=2.1018…found

Everything was found.

Anything anyone can suggest would be fantastic

Thanks

Rik

Richard Ellis
.Sun B2B Operations
Sun Microsystems x24727
http://sun.com

Hi Guys,

I first emailed this one in in May. Full details of the errors etc are
on this archive:

An extract is below, but full details of our system etc are on that thread.

System error

error: Can’t use string (“”) as a HASH ref while “strict refs” in
use at /opt/rt3/share/html/Elements/MyRT line 50, line 1662.
context:

46:
47:
48:


49:
50: % for my $portlet (@{$portlets->{body}}) {
51: <% $show_cb->( $portlet ) %>
52:

53: % }
54:

code stack: /opt/rt3/share/html/Elements/MyRT:50
/opt/rt3/share/html/index.html:79
/opt/rt3/share/html/autohandler:292

raw error http://gplive.uk:3000/index.html#raw

Can’t use string (“”) as a HASH ref while “strict refs” in use at
/opt/rt3/share/html/Elements/MyRT line 50, line 1662.

Trace begun at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Exceptions.pm line 131
HTML::Mason::Exceptions::rethrow_exception(‘Can't use string (“”) as a
HASH ref while “strict refs” in use at /opt/rt3/share/html/Elements/MyRT
line 50, line 1662.^J’) called at
/opt/rt3/share/html/Elements/MyRT line 50
HTML::Mason::Commands::ANON at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x18b3c20)’)
called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef) called at
/opt/rt3/share/html/index.html line 79
HTML::Mason::Commands::ANON at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x17bab60)’)
called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at
/opt/rt3/share/html/autohandler line 292
HTML::Mason::Commands::ANON at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x17e7afc)’)
called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 1069
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm
line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x1972fa4)’)
called at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 134
eval {…} at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x1972fa4)’)
called at
/usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm line 792
HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(0x12c3acc)’,
‘Apache=SCALAR(0x14cbd54)’) called at /opt/rt3/bin/webmux.pl line 123
eval {…} at /opt/rt3/bin/webmux.pl line 123
RT::Mason::handler(‘Apache=SCALAR(0x14cbd54)’) called at /dev/null line 0
eval {…} at /dev/null line 0

Since then, I have had private emails from 4 people, who are seeing the
same error. It occurred on our kit, when I was upgrading our test
instance from 3.4.6 to 3.6.3.

Everything was fine until after I applied the 3.5.1 patches and
restarted everything. It would appear this isn’t unique to our setup.

Does anyone have any ideas how to even begin to find the source of the
bug? I can’t take the risk of upgrading our live server until I can
prove this isn’t going to screw everything up and I need to complete
migrating our live instance to a new set of hardware soon.

Any ideas anyone?

Thanks
Richard

Richard Ellis
.Sun B2B Operations
Sun Microsystems x24727
http://sun.com

This code has been refactored for 3.6.4. Can you tell me if it still
happens with the RC of 3.6.4? (Which will become the release just as
soon as I get settled at work again.)

JesseOn Jul 3, 2007, at 10:03 AM, Richard Ellis wrote:

Hi Guys,

I first emailed this one in in May. Full details of the errors etc
are on this archive:
Carbon60: Managed Cloud Services
An extract is below, but full details of our system etc are on that
thread.

System error

error: Can’t use string (“”) as a HASH ref while “strict refs” in
use at /opt/rt3/share/html/Elements/MyRT line 50, line 1662.
context:

46:


47:
48:

49:
50: % for my $portlet (@{$portlets->{body}}) {
51: <% $show_cb->( $portlet ) %>
52:

53: % }
54:

code stack: /opt/rt3/share/html/Elements/MyRT:50
/opt/rt3/share/html/index.html:79
/opt/rt3/share/html/autohandler:292

raw error http://gplive.uk:3000/index.html#raw

Can’t use string (“”) as a HASH ref while “strict refs” in use at /
opt/rt3/share/html/Elements/MyRT line 50, line 1662.

Trace begun at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
Exceptions.pm line 131
HTML::Mason::Exceptions::rethrow_exception(‘Can't use string (“”)
as a HASH ref while “strict refs” in use at /opt/rt3/share/html/
Elements/MyRT line 50, line 1662.^J’) called at /opt/rt3/
share/html/Elements/MyRT line 50
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/
5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH
(0x18b3c20)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/
Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
Request.pm line 1068
HTML::Mason::Request::comp(undef, undef) called at /opt/rt3/share/
html/index.html line 79
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/
5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH
(0x17bab60)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/
Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at /opt/rt3/
share/html/autohandler line 292
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/
5.8.4/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH
(0x17e7afc)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/
Mason/Request.pm line 1069
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/
local/lib/perl5/site_perl/5.8.4/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
Request.pm line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH
(0x1972fa4)’) called at /usr/local/lib/perl5/site_perl/5.8.4/HTML/
Mason/ApacheHandler.pm line 134
eval {…} at /usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/
ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec
(‘HTML::Mason::Request::ApacheHandler=HASH(0x1972fa4)’) called at /
usr/local/lib/perl5/site_perl/5.8.4/HTML/Mason/ApacheHandler.pm
line 792
HTML::Mason::ApacheHandler::handle_request
(‘HTML::Mason::ApacheHandler=HASH(0x12c3acc)’, ‘Apache=SCALAR
(0x14cbd54)’) called at /opt/rt3/bin/webmux.pl line 123
eval {…} at /opt/rt3/bin/webmux.pl line 123
RT::Mason::handler(‘Apache=SCALAR(0x14cbd54)’) called at /dev/null
line 0
eval {…} at /dev/null line 0

Since then, I have had private emails from 4 people, who are seeing
the same error. It occurred on our kit, when I was upgrading our
test instance from 3.4.6 to 3.6.3.

Everything was fine until after I applied the 3.5.1 patches and
restarted everything. It would appear this isn’t unique to our setup.

Does anyone have any ideas how to even begin to find the source of
the bug? I can’t take the risk of upgrading our live server until I
can prove this isn’t going to screw everything up and I need to
complete migrating our live instance to a new set of hardware soon.

Any ideas anyone?

Thanks
Richard


Richard Ellis
.Sun B2B Operations
Sun Microsystems x24727
http://sun.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly
Media. Buy a copy at http://rtbook.bestpractical.com

PGP.sig (186 Bytes)

Hi Jessie,

Thanks, the error changes but it still doesn’t work properly. Don’t
even know where to begin to look for this error:
System error

error: Can’t use string (“”) as a HASH ref while “strict refs” in
use at /opt/rt3/share/html/Elements/MyRT line 74.
context:

70: HomepageSettings => $default_portlets? $default_portlets-

Content: {},
71: );
72: }
73:
74: my ($body, $summary) = @{$session{‘my_rt_portlets’}}{qw(body
summary)};
75: unless( $body && @$body ) {
76: $body = $summary || ;
77: $summary = undef;
78: }

code stack: /opt/rt3/share/html/Elements/MyRT:74
/opt/rt3/share/html/index.html:81
/opt/rt3/share/html/autohandler:291
raw error
Can’t use string (“”) as a HASH ref while “strict refs” in use at /
opt/rt3/share/html/Elements/MyRT line 74.

just before that line of code, can you Dumper $session{my_rt_portlets}?

Does this only happen for a particular user?

PGP.sig (186 Bytes)

Hi Jessie,

Appears to happen to all users. I’ll edit the code now (using rc2 version).

FYI, have updated DBI, DBIx::Searchbuilder and HTML::Mason to latest
revs, just in case that was an issue and also taken MySQL to latest v5 rev.

Richard
Jesse Vincent wrote:

Hi Jesse,

I have just removed all content under local/html and also dropped and
reinitialised the database and still see the same error. The only thing
I can think of is it must be a compatibility issue with one of the deps.

I’m checking an autobundle of our perl version 5.8.4 against the
testdeps requirements, one line at a time to try and find the culprit.

Thanks

Rik

Jesse Vincent wrote: