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.


Internal Server Error and malformed header from script

2009-04-27 Thread Jeff Zhuk
After moving to mod_perl with Apache 2.2 I had this problem while running a 
simple test.pl
 
The browser displayed: "HTTP 500 - Internal Server Error" and in the error.log 
I could see "malformed header from script" and "did not send an HTTP header"
 
Several people helped me to navigate over multiple related articles. Although 
we focused mostly on the httpd.conf file, in my case the problem was in the 
script itself.
 
I commented the first line in my test.pl and this made the magic.
Before moving to mod_perl I needed this line, but apparently not anymore.
 
#print "HTTP/1.0 200 OK\n"; ## !!! This line is extra while using mod_perl !!! 
- JZ
print "Content-Type: text/html\n\n";
print "\n";
print "HELLO!\n";

 
Here is the config in httpd.conf
 


SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
#PerlSendHeader On

Order allow,deny
Allow from all 


---
Thank you to everyone who responded to my messages, espesially Randy and Andre,
 
Jeff Zhuk


  

Re: [bugreport] Internal Server Error output - but no error

2007-12-31 Thread Perrin Harkins
On Dec 30, 2007 3:45 PM, Kate Yoak <[EMAIL PROTECTED]> wrote:
> returning 200 as a scalar from a content handler causes Apache to
> spit up "Internal Server Error" html despite a '200 OK'  status.
> There is no error or warning in the log, nor any other indication of
> a problem

This is more of an apache thing than a mod_perl thing.  The return
from a handler is not an HTTP status code but rather a code to tell
apache if the handler succeeded.  The HTTP status is set through the
Apache2::RequestRec object or sent manually as a header.  None of this
is changed by mod_perl, which just passes your return code through to
apache like any handler would.

- Perrin


Re: [bugreport] Internal Server Error output - but no error

2007-12-30 Thread Kate Yoak
I have solved the problem. I was returning 200 instead of using  
Apache2::Const::OK. My response was indeed interpreted as 'OK" by  
apache - but not by some place somewhere else. There was no error  
message anywhere. I'll modify the bugreport below to have it  
addressed or not at the maintainers' discretion.

On Dec 29, 2007, at 11:14 AM, Kate Yoak wrote:


I am using mp2bug format for the message.  Hope, that's ok!


=
-8<-- Start Bug Report 8<--
1. Problem Description:


returning 200 as a scalar from a content handler causes Apache to  
spit up "Internal Server Error" html despite a '200 OK'  status.  
There is no error or warning in the log, nor any other indication of  
a problem



sub handler{
return 200;
}

Generates the proper headers:
HTTP/1.1 200 OK
Date: Sun, 30 Dec 2007 03:12:03 GMT
Server: Apache/2.2.6 (Unix) mod_perl/2.0.3 Perl/v5.8.8
Content-Length: 497
Content-Type: text/html; charset=iso-8859-1

But then adds a 500 error html to the output:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.



Interestingly, a 302 result works correctly. A static page display  
is fine also. I have rebuilt perl & mod_perl since I encountered  
the error to no avail.


2. Used Components and their Configuration:

*** mod_perl version 2.03

*** using /tmp/mod_perl-2.0.3/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB => aprext
  MP_APXS=> /usr/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME => mod_perl
  MP_USE_DSO => 1


*** /usr/sbin/httpd -V
Server version: Apache/2.2.6 (Unix)
Server built:   Dec 28 2007 00:27:39
Server's Module Magic Number: 20051115:5
Server loaded:  APR 1.2.11, APR-Util 1.2.10
Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture:   32-bit
Server MPM: Prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
 -D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"

*** /usr/bin/ldd /usr/sbin/httpd
linux-gate.so.1 =>  (0x00e17000)
libm.so.6 => /lib/libm.so.6 (0x00c9e000)
libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0x00388000)
libpq.so.4 => /usr/lib/libpq.so.4 (0x002b2000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x005ae000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x00766000)
libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0x00365000)
libuuid.so.1 => /lib/libuuid.so.1 (0x003ae000)
librt.so.1 => /lib/librt.so.1 (0x003f)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cee000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00cda000)
libdl.so.2 => /lib/libdl.so.2 (0x00c98000)
libc.so.6 => /lib/libc.so.6 (0x00b6d000)
/lib/ld-linux.so.2 (0x00b4f000)
libssl.so.5 => /lib/libssl.so.5 (0x00d95000)
libcrypto.so.5 => /lib/libcrypto.so.5 (0x00101000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x0021)
libresolv.so.2 => /lib/libresolv.so.2 (0x00d1e000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00d33000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d5)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00d4b000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d6a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00cc5000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d9)


*** (apr|apu)-config linking info

 -L/usr/lib -laprutil-1 -lpq -lsqlite3 -lexpat
 -L/usr/lib -lapr-1 -luuid -lrt -lcrypt  -lpthread -ldl



*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
osname=linux, osvers=2.6.14-1.1653_fc4smp, archname=i686-linux
uname='linux nat.longmedia.com 2.6.14-1.1653_fc4smp #1 smp tue  
dec 13 21:46:01 est 2005 i686 i686 i386 gnulinux '


Internal Server Error output - but no error

2007-12-29 Thread Kate Yoak

I am using mp2bug format for the message.  Hope, that's ok!


=
-8<-- Start Bug Report 8<--
1. Problem Description:


I have just upgraded to apache2/modperl2 (bug report with specific  
version info is below) and I am getting the strangest behavior. The  
barebones content handler:


sub handler{
return 200;
}

Generates the proper headers:
HTTP/1.1 200 OK
Date: Sun, 30 Dec 2007 03:12:03 GMT
Server: Apache/2.2.6 (Unix) mod_perl/2.0.3 Perl/v5.8.8
Content-Length: 497
Content-Type: text/html; charset=iso-8859-1

But then adds a 500 error html to the output:


200 OK

OK
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.



I say, "adds" because I have verified that if any content is output  
by the handler, the 500 doc is appended.


There is no error in the error log.

Interestingly, a 302 result works correctly. A static page display is  
fine also. I have rebuilt perl & mod_perl since I encountered the  
error to no avail.


I have tested with no modules loaded into apache - and with template  
toolkit - which appears to be working correctly except for the  
problem above. I compiled mod_perl as a dso; no threads; everything  
else default.


Thanks for the help:


2. Used Components and their Configuration:

*** mod_perl version 2.03

*** using /tmp/mod_perl-2.0.3/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB => aprext
  MP_APXS=> /usr/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME => mod_perl
  MP_USE_DSO => 1


*** /usr/sbin/httpd -V
Server version: Apache/2.2.6 (Unix)
Server built:   Dec 28 2007 00:27:39
Server's Module Magic Number: 20051115:5
Server loaded:  APR 1.2.11, APR-Util 1.2.10
Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture:   32-bit
Server MPM: Prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
 -D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"

*** /usr/bin/ldd /usr/sbin/httpd
linux-gate.so.1 =>  (0x00e17000)
libm.so.6 => /lib/libm.so.6 (0x00c9e000)
libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0x00388000)
libpq.so.4 => /usr/lib/libpq.so.4 (0x002b2000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x005ae000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x00766000)
libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0x00365000)
libuuid.so.1 => /lib/libuuid.so.1 (0x003ae000)
librt.so.1 => /lib/librt.so.1 (0x003f)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cee000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00cda000)
libdl.so.2 => /lib/libdl.so.2 (0x00c98000)
libc.so.6 => /lib/libc.so.6 (0x00b6d000)
/lib/ld-linux.so.2 (0x00b4f000)
libssl.so.5 => /lib/libssl.so.5 (0x00d95000)
libcrypto.so.5 => /lib/libcrypto.so.5 (0x00101000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x0021)
libresolv.so.2 => /lib/libresolv.so.2 (0x00d1e000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00d33000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d5)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00d4b000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d6a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00cc5000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d9)


*** (apr|apu)-config linking info

 -L/usr/lib -laprutil-1 -lpq -lsqlite3 -lexpat
 -L/usr/lib -lapr-1 -luuid -lrt -lcrypt  -lpthread -ldl



*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
osname=linux, osvers=2.6.14-1.1653_fc4smp, archname=i686-linux
uname='linux nat.longmedia.com 2.6.14-1.1653_fc4smp #1 smp tue  
dec 13 21:46:01 est 2005 i686 i686 i386 gnulinux '

config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef  
usemultiplicity=undef

useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef us

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

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/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 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-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-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: 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 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 Jordan McLain
Yes. The Apache server is normally running. It is serving requests perfectly
fine before this starts a few hours later, intermittently.

Jordan

On 8/21/07, Luke Lu <[EMAIL PROTECTED]> wrote:
>
>  Are you sure the mod_perl already being running?
>
>
>  --
>
> *发件人:* Jordan McLain [mailto:[EMAIL PROTECTED]
> *发送时间:* 2007年8月22日 9:26
> *收件人:* mod_perl
> *主题:* 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.pm
>
> The handler method starts out with:
>
> sub handler ($$) {
> my ($class, $r) = @_;
>
> For some reason $r is not defined.  This only happens intermittently...
> Does anyone have any ideas?
> Apache/1.3.37 (Unix) mod_perl/1.29 mod_ssl/2.8.28 OpenSSL/0.9.7g
>
> mode_per
>
> Thanks,
> Jordan Mclain
>


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 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 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/


Internal Server Error

2007-08-21 Thread Jordan McLain
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.pm

The handler method starts out with:

sub handler ($$) {
my ($class, $r) = @_;

For some reason $r is not defined.  This only happens intermittently... Does
anyone have any ideas?
Apache/1.3.37 (Unix) mod_perl/1.29 mod_ssl/2.8.28 OpenSSL/0.9.7g

mode_per

Thanks,
Jordan Mclain


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/



internal server error in dspace

2007-03-08 Thread Viji ayyanar

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

at org.dspace.core.Context.abort(Context.java:249)

at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:99)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:332)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)

at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:667)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:595)
*Log file*

**
**
SEVERE: Servlet.service() for servlet admin_home threw exception
java.util.NoSuchElementException
at
org.apache.catalina.core.ApplicationHttpRequest$AttributeNamesEnumerator.nextElement
(ApplicationHttpRequest.java:931)
at org.dspace.custom.AdminHomeServlet.doDSPost(AdminHomeServlet.java:69)
at org.dspace.custom.AdminHomeServlet.doDSGet(AdminHomeServlet.java:47)
at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(
DSpaceServlet.java:151)
at org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:301)
at org.dspace.app.webui.util.JSPManager.showJSP(JSPManager.java:91)
at org.apache.jsp.home_jsp._jspService(org.apache.jsp.home_jsp:162)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:301)
at org.dspace.app.webui.util.JSPManager.showJSP(JSPManager.java:91)
at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile

Re: Getting internal server error when I run a simple CGI script

2006-08-21 Thread Randy Kobes

On Mon, 21 Aug 2006, Deepak Mallya wrote:


Hi,
   I am trying to run a simple Perl CGI script and I get the following
error..Can anyone help me on this


As others have noted, this isn't a mod_perl problem.
Help running cgi scripts is available at
  http://httpd.apache.org/docs/2.2/howto/cgi.html
For Windows, make sure that
   #!C:/Path/to/your/Perl/bin/perl.exe
appears on the first line of your script.

--
best regards,
Randy



Re: Getting internal server error when I run a simple CGI script

2006-08-21 Thread Philip M. Gollucci

Deepak Mallya wrote:

Hi,
 I am trying to run a simple Perl CGI script and I get the following 
error..Can anyone help me on this

This isn't really a mod_perl question, but I'm betting its because you need to 
do
chmod 755 file

or similiar.

Also, make sure that /usr/bin/perl is a valid perl path.



--

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /
 / /|_/ / // /\ \/ /_/ / /__
/_/  /_/\_, /___/\___\_\___/
   <___/


RE: Getting internal server error when I run a simple CGI script

2006-08-21 Thread Garrett, Philip \(MAN-Corporate\)



Check your Apache error logs.  "More information about this error 
may be available in the server error log."

  
  
  From: Deepak Mallya 
  [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 4:42 
  PMTo: modperl@perl.apache.orgSubject: Getting internal 
  server error when I run a simple CGI script
  
  Hi,
   I am trying to run a simple Perl CGI script and 
  I get the following error..Can anyone help me on this
   
  
  Internal Server Error
  The server encountered an internal error or misconfiguration and was unable 
  to complete your request.
  Please contact the server administrator, [EMAIL PROTECTED] and 
  inform them of the time the error occurred, and anything you might have done 
  that may have caused the error. 
  More information about this error may be available in the server error 
  log.
   
  my perl script contains 
  #!/usr/bin/perl
  print "Content-type: text/html\r\n\r\n";print 
  "\n";print "Hello 
  World!\n";print "\n";print 
  "Hello World!\n";print "\n";print 
  "\n";
   
   
  Thanks
  Deepak
   


Getting internal server error when I run a simple CGI script

2006-08-21 Thread Deepak Mallya
Hi,
 I am trying to run a simple Perl CGI script and I get the following error..Can anyone help me on this
 

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
 
my perl script contains 
#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";print "\n";print "Hello World!\n";print "\n";
print "Hello World!\n";print "\n";print "\n";
 
 
Thanks
Deepak
 


Re: Showing internal server error

2005-08-30 Thread Malcolm J Harwood
On Tuesday 30 August 2005 08:12 am, Mahesh kumar wrote:

Please reply to the list, not directly to me. Thanks.

> 
> Apache/2.0.54 (Unix) mod_perl/1.99_16 Perl/v5.8.7 Server at
> sssupport.asad.srishti Port 80

> [Tue Aug 30 17:31:40 2005] [error] [client 192.168.1.102] Can't locate
> object method "log_error" via package "Apache::RequestRec" at
> /usr/local/lib/perl5/site_perl/5.8.7/Apache/ASP.pm line 1709.\n

As I just wrote to (presumably your colleague - at the same domain anyway), 
you need to upgrade your modperl installation. See the list archives for 
yesterday.



-- 
Some dreams seem impossible, then they seem improbable.  But, then when we
summon the will, they seem inevitable.
- Christopher Reeve


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 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


Internal Server Error on perl.apache.org

2004-11-17 Thread Arshavir Grigorian
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
Hope it's easy to fix.
Best, Arshavir
--
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

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



Internal server error

2004-11-06 Thread Luke
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.


-- 
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: finding OK internal server error message

2004-07-25 Thread john z
tks for the direction. i uninstalled apache-asp. went into site\lib\ppm.xml 
and adjusted the record so that uwinnipeg is the first repository. 
installed with ppm. did a query to verify. went to the apache\asp.pm to 
verify manually.
tried the system. and no failure messages after 30 screens.

so it seems the problem was a quirk in ppm 2.1.6 which unfixed something 
that was fixed in apache-asp 2.57.

on the positive side of the problem, it did strongly encourage me to look 
at handlers with modperl. which  happened to provide an approach to taking 
http trafffic at a central site and farming it in very specific ways to 
other servers. 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004

-- 
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: finding OK internal server error message

2004-07-21 Thread Stas Bekman
john z wrote:
in brief, i am trying to find where modperl generates the infamous OK: 
The server encountered an internal error 

hopefully there is a decent way to either drop the error message, or at 
the least turn it into something that does not jar the client trying to 
use my system.

i wrote a rather large system with perscript, mysql, asp, and several 
other languages. the user interface with a web browser. all has worked 
very well. the user queries, perlscript and asp format html packages, 
and things happen.

except that every 5 to 15 web pages or so, are preambled or appended 
with an OK, server encountered an internal error. sometimes the preamble 
has a html snippet of 200 OK. there are of course several 
variations to the message. they do not seem to be produced by the same 
code in modperl.

i have checked  the html response page and find them absolutely properl. 
the database field that were supposed to be populated are populated. any 
data being sent back in the page is there. all is in order except that 
the preamble/ appended error message. there are no error messages issued 
to any of the apache log files. nada. zip.

to date, i have attempted the following to identify the problem or 
remove the error message.
1.  using the Errordocument directive for apache did give me some 
control for error messages issued by perl\site\lib\apache\asp\error.pm i 
note that one of the active developers in modperl (stas) did make 
reference to linking error-notes to the apache table.
2.  adding a PerlResponseHandler gave me no influence on the process. 
the OK error message occurs after the PerlLogHandler phase. this also 
explains why i do not get any error messages in the log files.
3. adding a PerlOutputFilterHandler in an attempt to automatically strip 
the OK error message failed. the code was fine but the error message is 
generated after this process point.
4. a string search for 'server encountered' found no hits under the 
perl\ tree. 4 hits under apache2\ tree.
- apache2\bin\libhttpd.dll,
- and 3 non effective in apache2\manual and apache2\error
5. i am not an guru on modperl and do not have the skills/ knowledge/ 
and time to become one. i do client applications. searching the modperl 
mailing lists did not reveal hints that i could understand on how to 
suppress this error message (or at least stop jarring clients).

i have also been looking at non standard approaches around this problem. 
can anyone point me to a place in the modperl code were i can introduce 
some code to check for the OK preamble/ append to change things. for 
example, where exactly is the response finally written to the client 
(including where the content headers, response code, etc are created).
mod_perl doesn't do anything like you've described. It's Apache or 
something else that appends this response. Instead of trying to hide the 
error, try to figure out what causes that by eliminating parts of your 
(apparently very complex) setup until you find the guilty party. Run the 
server in the single mode (httpd -DONE_PROCESS -DNO_DETACH) in order to 
reproduce the problem quicker).

Also in the future always send a proper bug report in order to help us 
to help you better. This is explained in details here:
http://perl.apache.org/bugs/

--
__
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


finding OK internal server error message

2004-07-21 Thread john z
in brief, i am trying to find where modperl generates the infamous OK: The 
server encountered an internal error 

hopefully there is a decent way to either drop the error message, or at the 
least turn it into something that does not jar the client trying to use my 
system.

i wrote a rather large system with perscript, mysql, asp, and several other 
languages. the user interface with a web browser. all has worked very well. 
the user queries, perlscript and asp format html packages, and things happen.

except that every 5 to 15 web pages or so, are preambled or appended with 
an OK, server encountered an internal error. sometimes the preamble has a 
html snippet of 200 OK. there are of course several variations 
to the message. they do not seem to be produced by the same code in modperl.

i have checked  the html response page and find them absolutely properl. 
the database field that were supposed to be populated are populated. any 
data being sent back in the page is there. all is in order except that the 
preamble/ appended error message. there are no error messages issued to any 
of the apache log files. nada. zip.

to date, i have attempted the following to identify the problem or remove 
the error message.
1.  using the Errordocument directive for apache did give me some control 
for error messages issued by perl\site\lib\apache\asp\error.pm i note that 
one of the active developers in modperl (stas) did make reference to 
linking error-notes to the apache table.
2.  adding a PerlResponseHandler gave me no influence on the process. the 
OK error message occurs after the PerlLogHandler phase. this also explains 
why i do not get any error messages in the log files.
3. adding a PerlOutputFilterHandler in an attempt to automatically strip 
the OK error message failed. the code was fine but the error message is 
generated after this process point.
4. a string search for 'server encountered' found no hits under the perl\ 
tree. 4 hits under apache2\ tree.
- apache2\bin\libhttpd.dll,
- and 3 non effective in apache2\manual and apache2\error
5. i am not an guru on modperl and do not have the skills/ knowledge/ and 
time to become one. i do client applications. searching the modperl mailing 
lists did not reveal hints that i could understand on how to suppress this 
error message (or at least stop jarring clients).

i have also been looking at non standard approaches around this problem. 
can anyone point me to a place in the modperl code were i can introduce 
some code to check for the OK preamble/ append to change things. for 
example, where exactly is the response finally written to the client 
(including where the content headers, response code, etc are created).

my platform includes win2k, sp4, current mod perl distribution from randy 
kobes (apache 2.0.50, mod 1.99-15, perl 5.8.4). however, this error has 
been turning up with 2 prior versions of the distribution (perl 5.8.1, 
5.8.3). (i did not load 5.8.2).

i must apologize for the length of the email. but i wanted to explain and 
identify what i had done to this point. i am fairly sure one of the 
responses will be to fix the problem so the error message does not appear. 
in this case, there does not seem to be any problem and the error message 
should disappear (or be made small and non alarming).

tks
john z.
[EMAIL PROTECTED]

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 7/16/2004

-- 
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