Prototype mismatch: sub main::strftime

2008-08-25 Thread Darragh Gammell
Hi

I'm getting this error in my apache logs but I've no idea how to fix it. Any
help would be much appreciated.

[Tue Aug 26 10:07:55 2008] [error] [client ] Prototype mismatch: sub
main::strftime: none vs ($\\@;$) at /usr/share/perl/5.8/Exporter.pm line
66., referer: https://secure.blah.net.au/tagtag/orderform.htm
[Tue Aug 26 10:07:55 2008] [error] [client ]  at
/home/secure/public_html/tagtag/send.cgi



If I execute the cgi script manually with a -w I get some more info

Subroutine main::strftime redefined at /usr/share/perl/5.8/Exporter.pm line
66.
 at /home/secure/public_html/tagtag/send.cgi line 10
Prototype mismatch: sub main::strftime: none vs ($\@;$) at
/usr/share/perl/5.8/Exporter.pm line 66.
 at /home/secure/public_html/tagtag/send.cgi line 10
[Tue Aug 26 13:12:21 2008] send.cgi: "my" variable $error masks earlier
declaration in same scope at /home/secure/public_html/tagtag/send.cgi line
147.
Content-Type: text/html; charset=ISO-8859-1


Top lines of the script:

#!/usr/bin/perl -w


#use strict;
use POSIX qw(strftime);
use CGI qw(:standard);
use CGI::Carp;
#use vars qw($DEBUGGING);
use Date::Parse;
use Date::Format;

use IO::Handle;
use GnuPG::Interface;
use MIME::Lite;


Lines 62-66 of Exporter.pm:

  return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
  local $SIG{__WARN__} =
sub {require Carp; &Carp::carp};
  # shortcut for the common case of no type character
  *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;



Thanks

Darragh


Re: $m->session

2007-12-11 Thread Darragh Gammell
>From the mason devel Manual we see:

$m, the Mason request object, provides an analogous API for Mason. Almost
all Mason features not activated by syntactic tags are accessed via $m
methods.

But looking under "HTML::Mason::Request - Mason Request Class" there is no
reference to $m->session. This is where I'm getting confused.

Is it possible that whomever wrote this website created their own Object
called $m->session and thats why I cant find it anywhere?

My Apologies for the silly questions, trying to get to grips with new
technologies with no developers present.

Regards

Darragh


On Dec 12, 2007 11:48 AM, Aaron Dalton <[EMAIL PROTECTED]> wrote:

> $m->session is a Mason construct.
>
> --
> Aaron Dalton
> http://perlkonig.com
>
>


$m->session

2007-12-11 Thread Darragh Gammell
Does anyone know what $m->session pertains to. ie. Is it part of a mod_perl
or mason package.

I am attempting to run this command on a site using mod_perl2, Apache2 and
Mason 1.37 but keep getting an error:

Can't locate object method "session" via package
"HTML::Mason::Request::ApacheHandler" at /home/mc2/public_html/autohandler
line 404.

*404:*  if ($m->session->{textonly} eq "on") {
Its from code used on a website Im trying to relocate to a new server.

Any indications would be helpful.

Thanks

Darragh


Can't locate object method "session" via package "HTML::Mason::Request::ApacheHandler"

2007-12-06 Thread Darragh Gammell
Hi

My apologies if this is the second instance this query. I sent the same mail
3 days ago but have not seen it appear on the mailing listso here goes
again.

Ive recently tried moving a website from an old server which is having
hardware issues to a recently purchased server.

Old Server ran:
Linux 2.6.11-1-686-smp #1 SMP Mon Jun 20 20:18:45 MDT 2005 i686 GNU/Linux
Mason 1.21
mod_perl
and apache 1.3


I'm now trying to get the same website running on:

Ubuntu gutsy Linux 2.6.22-14-server
Mason 1.37
Apache2
mod_perl2

Highlights for the apache2 hhtpd.conf :

PerlModule HTML::Mason
PerlModule HTML::Mason::ApacheHandler
PerlModule Apache2::Request
PerlModule Apache::DBI

and the vhost:

PerlRequire /etc/apache2/handler.pl


#Options -Indexes
#HTML::Mason handles any .html files

SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler

# Deny .comp files from being accessed directly



SetHandler perl-script
PerlInitHandler Apache2::Const::NOT_FOUND





Im getting this error in the browser however:

*error:*  Can't locate object method "session" via package
"HTML::Mason::Request::ApacheHandler" at /home/mac/public_html/autohandler
line 402.
 *context:*   *...*
 *398:*  % }  *399:*
 *400:*  <%filter>  *401:*
 *402:*  if ($m->session->{textonly} eq "on") {  *403:*  s///g;
*404:*  unless ($m->session->{inside_file_management} eq "yes") {  *405:*
s/\//g;  *406:*  s/\//g;  *...*
   *code stack:*  /home/mc2/public_html/autohandler:402

Can't locate object method "session" via package
"HTML::Mason::Request::ApacheHandler" at
/home/mac/public_html/autohandler line 402.





Trace begun at /usr/local/share/perl/5.8.8/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t locate object
method "session" via package "HTML::Mason::Request::ApacheHandler" at
/home/mac/public_html/autohandler line 402.^J') called at
/home/mac/public_html/autohandler line 402



HTML::Mason::Commands::__ANON__('')
called at /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 1277
HTML::Mason::Request::comp(undef, undef, undef) called at
/usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 466



eval {...} at /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 466
eval {...} at /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 418
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x39f6200)')
called at /usr/local/share/perl/5.8.8/HTML/Mason/ApacheHandler.pm line
168



HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x39f6200)')
called at /usr/local/share/perl/5.8.8/HTML/Mason/ApacheHandler.pm line
826
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x341fbf0)',
'Apache2::RequestRec=SCALAR(0x25b42e0)') called at (eval 32) line 8



HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler',
'Apache2::RequestRec=SCALAR(0x25b42e0)') called at -e line 0


eval {...} at -e line 0



Any help/indications regarding whats going on here would be greatly
appreciated.
Just reply with what info is better to give too if this isnt enough.

Thanks in advance

Darragh


For reference heres whats installed along with the OS:

apt-get update
apt-get upgrade



apt-get install build_essential
apt-get install ssh
apt-get install apache2
apt-get install postgresql-8.2
apt-get install apt-show-versions
apt-get install libapache2-mod-perl2-dev
apt-get install libhtml-mason-perl



apt-get install apache2-prefork-dev
apt-get install apache2-src
apt-get install sendmail
apt-get install libapache2-mod-apreq2
apt-get install libapache2-request-perl (and use 'a2enmod apreq' to
load the module into Apache2.)





HTML::Mason (HTML-Mason-1.37)
Data::Dumper(Data-Dumper-2.121)
DBI(DBI-1.601)
DBD(DBD-Pg-1.49)
CGI(CGI.pm-3.31)
Date::Parse(TimeDate-1.16)
Date::Calc(Date-Calc-5.4)
mod_perl2 (mod_perl-

2.0.3
) need to cd /usr/lib;ln -s /usr/lib/libperl.so.5.8 libperl.so
ExtUtils::XSBuilder(ExtUtils-XSBuilder-0.28)
version(version-0.74)
Parse::RecDescent(Parse-RecDescent-v1.95.1)
Apache::Cookie (libapreq2-2.08

)

Apache::DBI(Apache-DBI-1.06)
Sub::Uplevel(Sub-Uplevel-0.18)
Test::Simple(Test-Simple-0.74)
Test::Tester(Test-Tester-0.106)
Test::NoWarnings(Test-NoWarnings-0.084)
Test::Exception(Test-Exception-0.25

)
Test::Deep(
Test-Deep-0.099)
Apache::Session(Apache-Session-1.81)
Apache::Session::Wrapper(Apache-Session-Wrapper-0.33)
MasonX::Request::WithApacheSession(MasonX-Request-WithApacheSession-0.30)

Text::Reform(

Text-Reform-v1.12.2
)
Text::Autoformat(Text-Autoformat-v1.14.0)
MIME::Base64(MIME-Base64-3.07)
Pod::Escapes(Pod-Escapes-1.04)
Pod::Simple(Pod-Simple-3.05)
Test::Pod(Test-Pod-1.26)

MIME::Types(MIME-Types-1.22

)
Mail::Address(
MailTools-2.02)
Email::Date::Format(Email-Date-Format-1.000)
Email::Abstract(Email-Abstract-2.134)
Time::Pie

Re: Can't locate object method "session" via package "HTML::Mason::Request::ApacheHandler" .

2007-12-05 Thread Darragh Gammell
Hi
>
> Ive recently tried moving a website from an old server which is having
> hardware issues to a recently purchased server.
>
> Old Server ran:
> Linux 2.6.11-1-686-smp #1 SMP Mon Jun 20 20:18:45 MDT 2005 i686 GNU/Linux
> Mason 1.21
> mod_perl
> and apache 1.3
>
>
> I'm now trying to get the same website running on:
>
> Ubuntu gutsy Linux 2.6.22-14-server
> Apache2
> mod_perl2
>
> Highlights for the apache2 hhtpd.conf :
>
> PerlModule HTML::Mason
> PerlModule HTML::Mason::ApacheHandler
> PerlModule Apache2::Request
> PerlModule Apache::DBI
>
> and the vhost:
>
> PerlRequire /etc/apache2/handler.pl
>
> 
> #Options -Indexes
> #HTML::Mason handles any .html files
> 
> SetHandler perl-script
> PerlHandler HTML::Mason::ApacheHandler
> 
> # Deny .comp files from being accessed directly
> 
>
> 
> SetHandler perl-script
> PerlInitHandler Apache2::Const::NOT_FOUND
> 
>
>
>
>
> Im getting this error in the browser however:
>
> *error:*  Can't locate object method "session" via package
> "HTML::Mason::Request::ApacheHandler" at /home/mac/public_html/autohandler
> line 402.
>  *context:*   *...*
>  *398:*  % }  *399:*
>  *400:*  <%filter>  *401:*
>  *402:*  if ($m->session->{textonly} eq "on") {  *403:*  s/ src=.+?>//g;  *404:*  unless ($m->session->{inside_file_management} eq
> "yes") {  *405:*  s/\//g;  *406:*
> s/\//g;  *...*
>*code stack:*  /home/mc2/public_html/autohandler:402
>
> Can't locate object method "session" via package 
> "HTML::Mason::Request::ApacheHandler" at /home/mac/public_html/autohandler 
> line 402.
>
>
> Trace begun at /usr/local/share/perl/5.8.8/HTML/Mason/Exceptions.pm line 129
> HTML::Mason::Exceptions::rethrow_exception('Can\'t locate object method 
> "session" via package "HTML::Mason::Request::ApacheHandler" at 
> /home/mac/public_html/autohandler line 402.^J') called at 
> /home/mac/public_html/autohandler line 402
> HTML::Mason::Commands::__ANON__('') called at 
> /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 1277
> HTML::Mason::Request::comp(undef, undef, undef) called at 
> /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 466
> eval {...} at /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 466
> eval {...} at /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 418
> HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x39f6200)')
>  called at /usr/local/share/perl/5.8.8/HTML/Mason/ApacheHandler.pm line 168
> HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x39f6200)')
>  called at /usr/local/share/perl/5.8.8/HTML/Mason/ApacheHandler.pm line 826
> HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x341fbf0)',
>  'Apache2::RequestRec=SCALAR(0x25b42e0)') called at (eval 32) line 8
> HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 
> 'Apache2::RequestRec=SCALAR(0x25b42e0)') called at -e line 0
>
>
> eval {...} at -e line 0
>
>
>
> Any help/indications regarding whats going on here would be greatly
> appreciated.
> Just reply with what info is better to give too if this isnt enough.
>
> Thanks in advance
>
> Darragh
>
>
> For reference heres whats installed along with the OS:
>
> apt-get update
> apt-get upgrade
> apt-get install build_essential
> apt-get install ssh
> apt-get install apache2
> apt-get install postgresql-8.2
> apt-get install apt-show-versions
> apt-get install libapache2-mod-perl2-dev
> apt-get install libhtml-mason-perl
> apt-get install apache2-prefork-dev
> apt-get install apache2-src
> apt-get install sendmail
> apt-get install libapache2-mod-apreq2
> apt-get install libapache2-request-perl (and use 'a2enmod apreq' to load the 
> module into Apache2.)
>
>
> HTML::Mason (HTML-Mason-1.37)
> Data::Dumper(Data-Dumper-2.121)
> DBI(DBI-1.601)
> DBD(DBD-Pg-1.49)
> CGI(CGI.pm-3.31)
> Date::Parse(TimeDate-1.16)
> Date::Calc(Date-Calc-5.4)
> mod_perl2 (mod_perl-2.0.3
> ) need to cd /usr/lib;ln -s /usr/lib/libperl.so.5.8 libperl.so
> ExtUtils::XSBuilder(ExtUtils-XSBuilder-0.28)
> version(version-0.74)
> Parse::RecDescent(Parse-RecDescent-v1.95.1)
> Apache::Cookie (libapreq2-2.08)
>
> Apache::DBI(Apache-DBI-1.06)
> Sub::Uplevel(Sub-Uplevel-0.18)
> Test::Simple(Test-Simple-0.74)
> Test::Tester(Test-Tester-0.106)
> Test::NoWarnings(Test-NoWarnings-0.084)
> Test::Exception(Test-Exception-0.25)
> Test::Deep(Test-Deep-0.099)
> Apache::Session(Apache-Session-1.81)
> Apache::Session::Wrapper(Apache-Session-Wrapper-0.33)
> MasonX::Request::WithApacheSession(MasonX-Request-WithApacheSession-0.30)
> Text::Reform(Text-Reform-v1.12.2
> )
> Text::Autoformat(Text-Autoformat-v1.14.0)
> MIME::Base64(MIME-Base64-3.07)
> Pod::Escapes(Pod-Escapes-1.04)
> Pod::Simple(Pod-Simple-3.05)
> Test::Pod(Test-Pod-1.26)
> MIME::Types(MIME-Types-1.22)
> Mail::Address(MailTools-2.02)
> Email::Da