Re: Internal server error

2004-11-06 Thread Randy Kobes
On Thu, 4 Nov 2004, Luke wrote:

> I have an intresting problem, I have a test server running windows 2k,
> Activestate perl and apache 2.
>
> I have loaded the perl module mod_perl.so as well as told it to use
> C:/Perl/bin/perlxx.dll.
>
> In the httpd.conf I have commented out the script alias
> and add ExecCGI to the options, then added AddHandler
> cgi-script .cgi .pl to the configuration. Now when I try
> to run any perl script or cgi script I get an internal
> server error 500. With some vauge stuff in the error log
> that dosn't seem to be pertant at all. Ceratinaly not a
> cause for an internal error. Its not like the world would
> end if it couldn't find favico.ico.
>
> The perl script run a commandline or atleast parse. SO Im
> out of Ideas on waht to do.

If this is a problem with a cgi script, or configuration,
then you'll get better help in a cgi or Apache user's group.
If this has to do with mod_perl specifically, then posting a
minimal script illustrating the problem, along with the
relevant Apache directives, would help. Also include your
mod_perl/perl/Apache versions, and anything in the error log
that results from running this, even if the messages look
innocent.

-- 
best regards,
randy kobes


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Internal server error

2004-11-07 Thread Luke
Thanks for your response. However at the moment what I needed was perl to work  
on my webserver for testing purpose only on a global level. I found a way to  
enable perl using an apache directive and bypassed mod_perl altogether. So for  
the time being everything is fine. Thanks for you response though, its more  
then whatI got in the few irc channels I visited.  
  


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Internal Server Error

2007-08-21 Thread Jeff Pang
Try change the codes to:sub handler {    my $r = shift;    ...-Original Message-
From: Jordan McLain <[EMAIL PROTECTED]>
Sent: Aug 22, 2007 9:26 AM
To: mod_perl 
Subject: Internal Server Error

Hello,I have a module that will fail every once in a while with the error_log message:Can't call method "send_http_header" on an undefined value at /path/to/module/Name.pmThe handler method starts out with:
sub handler ($$) {    my ($class, $r) = @_;


--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/


Re: Internal Server Error

2007-08-21 Thread Perrin Harkins
On 8/21/07, Jordan McLain <[EMAIL PROTECTED]> wrote:
> sub handler ($$) {
> my ($class, $r) = @_;
>
> For some reason $r is not defined.  This only happens intermittently... Does
> anyone have any ideas?

Sounds like sometimes it doesn't get properly called as a method, so
$r ends up as the first arg.  Can you show us the relevant part of
your httpd.conf?

- Perrin


Re: Internal Server Error

2007-08-21 Thread Colin Wetherbee

Jeff Pang wrote:

Try change the codes to:

sub handler {

my $r = shift;
...


If his handler is called as a method, $class is an appropriate first 
variable to shift out of @_.  Using ($class, $r) = @_ is a perfectly 
legitimate way of taking care of that.


Colin


Re: Internal Server Error

2007-08-21 Thread Jordan McLain
I might have solved my own problem...
I was calling:

PerlHandler Package::Name

instead of:

PerlHandler Package::Name->handler

although I am still confused as to why the first was working...

Jordan

On 8/21/07, Colin Wetherbee <[EMAIL PROTECTED]> wrote:
>
> Jeff Pang wrote:
> > Try change the codes to:
> >
> > sub handler {
> >
> > my $r = shift;
> > ...
>
> If his handler is called as a method, $class is an appropriate first
> variable to shift out of @_.  Using ($class, $r) = @_ is a perfectly
> legitimate way of taking care of that.
>
> Colin
>


Re: Internal Server Error

2007-08-21 Thread Jeff Pang


-Original Message-
>From: Jordan McLain <[EMAIL PROTECTED]>
>Sent: Aug 22, 2007 10:52 AM
>To: modperl@perl.apache.org
>Subject: Re: Internal Server Error
>
>I might have solved my own problem...
>I was calling:
>
>PerlHandler Package::Name
>
>instead of:
>
>PerlHandler Package::Name->handler
>

So on the first case,we need to write the handler as 
sub handler { my $r = shift; ...}
because Apache may call the function directly as Package::Name::handler.

on the second case,we write handler as,
sub handler { my $class = shift; my $r = shift; ... }
because '->' is a method calling.

Am I right?
btw,I always used the first config.

--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/


Re: Internal Server Error

2007-08-21 Thread Foo JH


So on the first case,we need to write the handler as 
sub handler { my $r = shift; ...}

because Apache may call the function directly as Package::Name::handler.

on the second case,we write handler as,
sub handler { my $class = shift; my $r = shift; ... }
because '->' is a method calling.

Am I right?
btw,I always used the first config.
Are there any technical advantages with either method, or is it a 
TIMTOWDI option given to the developers?


Re: Internal Server Error

2007-08-21 Thread Jeff Pang


-Original Message-
>From: Foo JH <[EMAIL PROTECTED]>
>Sent: Aug 22, 2007 11:15 AM
>To: Jeff Pang <[EMAIL PROTECTED]>
>Cc: Jordan McLain <[EMAIL PROTECTED]>, modperl@perl.apache.org
>Subject: Re: Internal Server Error
>
>
>> So on the first case,we need to write the handler as 
>> sub handler { my $r = shift; ...}
>> because Apache may call the function directly as Package::Name::handler.
>>
>> on the second case,we write handler as,
>> sub handler { my $class = shift; my $r = shift; ... }
>> because '->' is a method calling.
>>
>> Am I right?
>> btw,I always used the first config.
>Are there any technical advantages with either method, or is it a 
>TIMTOWDI option given to the developers?

I don't see anyone.Modperl's documents say both are fine.

--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/


Re: Internal Server Error

2007-08-23 Thread Perrin Harkins
On 8/21/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> >PerlHandler Package::Name
> >
> >instead of:
> >
> >PerlHandler Package::Name->handler
> >
>
> So on the first case,we need to write the handler as
> sub handler { my $r = shift; ...}
> because Apache may call the function directly as Package::Name::handler.
>
> on the second case,we write handler as,
> sub handler { my $class = shift; my $r = shift; ... }
> because '->' is a method calling.

For method handlers, you also have to declare it differently.

In mod_perl 1:
sub handler ($$) {

In mod_perl 2:
sub handler : method {

- Perrin


Re: Internal Server Error

2007-08-23 Thread Perrin Harkins
On 8/21/07, Foo JH <[EMAIL PROTECTED]> wrote:
> Are there any technical advantages with either method, or is it a
> TIMTOWDI option given to the developers?

You can structure your code differently with method handlers, in ways
that appeal to some people.  There's an example here:
http://modperlbook.org/html/ch06_12.html

- Perrin


Re: Internal Server Error

2007-08-23 Thread Jeff Pang
2007/8/24, Perrin Harkins <[EMAIL PROTECTED]>:
> On 8/21/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> > >PerlHandler Package::Name
> > >
> > >instead of:
> > >
> > >PerlHandler Package::Name->handler
> > >
> >
> > So on the first case,we need to write the handler as
> > sub handler { my $r = shift; ...}
> > because Apache may call the function directly as Package::Name::handler.
> >
> > on the second case,we write handler as,
> > sub handler { my $class = shift; my $r = shift; ... }
> > because '->' is a method calling.
>
> For method handlers, you also have to declare it differently.
>
> In mod_perl 1:
> sub handler ($$) {
>

why it need prototype in mp1's method handler?


Re: Internal Server Error

2007-08-23 Thread Perrin Harkins
On 8/23/07, Foo JH <[EMAIL PROTECTED]> wrote:
> I've read http://perldoc.perl.org/attributes.html about attributes, but
> it does not seem to suggest that tagging the method attribute to
> subroutine has any programming advantages, unless you're interested to
> list the subroutines with that attribute. But I suspect there's more to it.

It tells mod_perl that the handler should be called as a method.
http://perl.apache.org/docs/2.0/user/porting/compat.html#Method_Handlers

- Perrin


Re: Internal Server Error

2007-08-23 Thread Foo JH

Hello Perrin,

I'm interested in how you defined your handler with the 'method' attribute:
sub handler : method {
...

I've read http://perldoc.perl.org/attributes.html about attributes, but 
it does not seem to suggest that tagging the method attribute to 
subroutine has any programming advantages, unless you're interested to 
list the subroutines with that attribute. But I suspect there's more to it.


Perhaps you can clue me in on this?

Perrin Harkins wrote:

On 8/21/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
  

PerlHandler Package::Name

instead of:

PerlHandler Package::Name->handler

  

So on the first case,we need to write the handler as
sub handler { my $r = shift; ...}
because Apache may call the function directly as Package::Name::handler.

on the second case,we write handler as,
sub handler { my $class = shift; my $r = shift; ... }
because '->' is a method calling.



For method handlers, you also have to declare it differently.

In mod_perl 1:
sub handler ($$) {

In mod_perl 2:
sub handler : method {

- Perrin
  




Re: Internal Server Error

2007-08-23 Thread Perrin Harkins
On 8/23/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> why it need prototype in mp1's method handler?

Subroutine attributes did not exist before perl 5.6.

- Perrin


Re: Internal Server Error on perl.apache.org

2004-11-17 Thread Stas Bekman
Arshavir Grigorian wrote:
Hello list,
I just tried searching for 'path_info' in the 2.0 docs and got an 
internal server error(500).

http://perl.apache.org/search/swish.cgi?query=path_info&sbm=SecI&submit=search 
The /x1/log/www/error_log says:
[Wed Nov 17 15:01:50 2004] [error] [client 65.92.240.155] Out of memory!
[Wed Nov 17 15:01:50 2004] [error] [client 65.92.240.155] Premature end of 
script headers: swish.cgi

Is something wrong with minotaur.apache.org?
or does this have anything to do with the recent infrastructure changes?
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Internal Server Error on perl.apache.org

2004-11-18 Thread Stas Bekman
Stas Bekman wrote:
Arshavir Grigorian wrote:
Hello list,
I just tried searching for 'path_info' in the 2.0 docs and got an 
internal server error(500).

http://perl.apache.org/search/swish.cgi?query=path_info&sbm=SecI&submit=search 

The /x1/log/www/error_log says:
[Wed Nov 17 15:01:50 2004] [error] [client 65.92.240.155] Out of memory!
[Wed Nov 17 15:01:50 2004] [error] [client 65.92.240.155] Premature end 
of script headers: swish.cgi

Is something wrong with minotaur.apache.org?
or does this have anything to do with the recent infrastructure changes?
Not sure whether someone has done something or not, but it seems to work 
now.

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: internal server error in dspace

2007-03-08 Thread Jeremy Wall
On Monday 05 March 2007 08:20, Viji ayyanar wrote:
> hai,
>I have encountered an error when i access the homepage. if possible give
> me the solution to resolve this problem . Thank You
> *The error is *
> **
>
> An internal server error occurred on http://localhost:8080/xdams:
>
> Date: 3/5/07 6:23 PM
>
> Session ID: 0FA0F70BB560560A23B187A54718A5CD
>
> -- URL Was: http://localhost:8080/xdams/admin_home
>
> -- Method: GET
>
> -- Parameters were:
>
>
>
> Exception:
>
> java.lang.NullPointerException

I think you meant to post this to a different List. While I'm sure some folks 
on here know something about Java and dspace I'm also sure most of them won't 
answer you in this list since it's devoted to ModPerl questions.




Jeremy Wall
[EMAIL PROTECTED]
http://jeremy.marzhillstudios.com/



Re: Internal Server Error and malformed header from script

2009-04-27 Thread André Warnier

Jeff Zhuk wrote:
...
Jeff,
whenever you send a message to the mod_perl list, I get a copy, because 
I am subscribed to the list.

Then I get another copy, because you also send a copy to me directly.
So I get each message twice.
I guess it's the same for Randy.
It is not a real problem, but it is annoying, so stop doing this, and 
send your messages to the list only, please.

Thanks.