Re: mod_perl and mod_cgi problems

2003-02-01 Thread @(none)
Thanks!

I've actually made some kind of progress on this case... I've found a 
workaround... I don't fully like it, so if anyone got a sugestion for 
aprovement, please tell me!

This was the "problem area" in my old httpd.conf:
(...)
AddHandler cgi-script  .cgi

AddHandler perl-script .mpl
PerlHandler Apache::Registry


I've converted it into this:

AddHandler perl-script .cgi
PerlHandler Apache::PerlRun
PerlSetVar   PerlRunOnce On



AddHandler perl-script .mpl
PerlHandler Apache::Registry


This works fine, but it will only work for perl-scripts and not for 
shell-scripts. Well, to bad! For the perl-script part it actually runs 
faster! Apache don't need to fork any new processes to compile the cgi...

If I add the following line to my httpd.conf:
AddHandler cgi-script  .sh

This will most likely (not tested) fail like .cgi did when I used 
cgi-script-handler in apache... So the problem aren't solved yet!

Stas Bekman wrote:

The latest "Linker patch" are installed on the server...



In that case I hope that somebody else who's on Solaris could step in 
and help. 

I do hope that someone can explain to me why mod_cgi and mod_perl don't 
work well together. It worked just fine using apache 1.3.14 and mod_perl 
1.X (another version I can't remember). But with apache 1.3.27 and 
mod_perl 1.27, it didn't.



Re: mod_perl and mod_cgi problems

2003-01-30 Thread Stas Bekman
"@(none) <"@genuity.no wrote:

Thanks!

I've actually made some kind of progress on this case... I've found a 
workaround... I don't fully like it, so if anyone got a sugestion for 
aprovement, please tell me!

This was the "problem area" in my old httpd.conf:
(...)
AddHandler cgi-script  .cgi

AddHandler perl-script .mpl
PerlHandler Apache::Registry


I've converted it into this:

AddHandler perl-script .cgi
PerlHandler Apache::PerlRun
PerlSetVar   PerlRunOnce On



AddHandler perl-script .mpl
PerlHandler Apache::Registry


This works fine, but it will only work for perl-scripts and not for 
shell-scripts. Well, to bad! For the perl-script part it actually runs 
faster! Apache don't need to fork any new processes to compile the cgi...

If I add the following line to my httpd.conf:
AddHandler cgi-script  .sh

This will most likely (not tested) fail like .cgi did when I used 
cgi-script-handler in apache... So the problem aren't solved yet!

Any particular reason for using AddHandler and not SetHandler?



__
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




Re: mod_perl and mod_cgi problems

2003-01-30 Thread Stas Bekman
Magnar Stav Johanssen wrote:

Sending you a piece of my httpd.conf file:

[...]

looks fine to me.


Have you tried looking in the archives? I have found:
http://marc.theaimsgroup.com/?l=apache-modperl&w=2&r=1&s=libthread+panic&q=b 

Well, I've used google.com alot, but maybe I didn't push the "magic" 
button!

No need to google, pick your favorite archive from:
http://perl.apache.org/maillist/modperl.html#Searchable_Archives
(hint: linked from the menu)


In particular:
http://marc.theaimsgroup.com/?l=apache-modperl&m=91763462706496&w=2



For testing I've tuned down my MaxServers to 5 so I easier can trace 
httpd. In production MaxServers has been tuned for its amount of Memory!

http://marc.theaimsgroup.com/?l=apache-modperl&m=97363770902299&w=2



The latest "Linker patch" are installed on the server...


In that case I hope that somebody else who's on Solaris could step in and help.

__
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




Re: mod_perl and mod_cgi problems

2003-01-30 Thread Magnar Stav Johanssen
Sending you a piece of my httpd.conf file:

LoadModule perl_module /local/lib/apache/libperl.so

AddHandlercgi-script.cgi



SetHandlerperl-script
PerlHandlerApache::Status
PerlSetVarStatusDumperOn
PerlSetVarStatusPeekOn
PerlSetVarStatusGraphOn




PerlFreshRestartOn
PerlSetupEnvOn
PerlSendHeaderOn
AddHandlerperl-script.mpl
PerlHandler  Apache::Registry


-> I've tryed using "PerlHandler Apache::PerlRun" with same result as 
Apache::Registry. Adding "PerlSetVar PerlRunOnce On" -> everything works fine, 
but then again whats the need of using mod_perl then?

mod_perl and apache are compiled using the same compiler (cc is 
/local/CC/SUNWspro/bin/cc)

$ httpd -l
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_define.c
  mod_log_config.c
  mod_mime.c
  mod_status.c
  mod_info.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_alias.c
  mod_go.c
  mod_access.c
  mod_auth.c
  mod_auth_anon.c
  mod_auth_dbm.c
  mod_auth_db.c
  mod_expires.c
  mod_headers.c
  mod_unique_id.c
  mod_so.c
  mod_setenvif.c

Stas Bekman wrote:
Magnar Stav Johanssen wrote:

What can I do to solve this?



Have you tried looking in the archives? I have found:
http://marc.theaimsgroup.com/?l=apache-modperl&w=2&r=1&s=libthread+panic&q=b 

Well, I've used google.com alot, but maybe I didn't push the "magic" button!




In particular:
http://marc.theaimsgroup.com/?l=apache-modperl&m=91763462706496&w=2


For testing I've tuned down my MaxServers to 5 so I easier can trace httpd. In 
production MaxServers has been tuned for its amount of Memory!

http://marc.theaimsgroup.com/?l=apache-modperl&m=97363770902299&w=2


The latest "Linker patch" are installed on the server...

Regards!




Re: mod_perl and mod_cgi problems

2003-01-29 Thread Stas Bekman
Magnar Stav Johanssen wrote:

Hi!

On my Solaris 5.8 machine I'm running apache 1.3.27 with mod_cgi and 
mod_perl 1.0. mod_cgi is compiled into apache and mod_perl are loaded in 
my httpd.conf.

When I'm requesting for any .cgi script (tested with: #!/usr/bin/perl or 
#!/bin/sh) everything works fine, and the scripts compile and return a 
200 message to my browser. But after a request that involves mod_perl - 
.mpl (#!/usr/bin/perl), these cgi scripts crashes with "500: internal 
server error"

This is the error.log:
libthread panic: cannot create new lwp : dumping core (PID: 9028 LWP 2)
stacktrace:
ff052030
0

If I start a truss -p on the apache process (all processes) the request 
will be OK and reply a 200 OK message. After I've turned off all 
trusses, the errormessage is still there.

Then I need to restart apache and all cgi scripts are working fine again.

What can I do to solve this?

Have you tried looking in the archives? I have found:
http://marc.theaimsgroup.com/?l=apache-modperl&w=2&r=1&s=libthread+panic&q=b

In particular:
http://marc.theaimsgroup.com/?l=apache-modperl&m=91763462706496&w=2
http://marc.theaimsgroup.com/?l=apache-modperl&m=97363770902299&w=2

__
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




mod_perl and mod_cgi problems

2003-01-29 Thread Magnar Stav Johanssen
Hi!

On my Solaris 5.8 machine I'm running apache 1.3.27 with mod_cgi and mod_perl 
1.0. mod_cgi is compiled into apache and mod_perl are loaded in my httpd.conf.

When I'm requesting for any .cgi script (tested with: #!/usr/bin/perl or 
#!/bin/sh) everything works fine, and the scripts compile and return a 200 
message to my browser. But after a request that involves mod_perl - .mpl 
(#!/usr/bin/perl), these cgi scripts crashes with "500: internal server error"

This is the error.log:
libthread panic: cannot create new lwp : dumping core (PID: 9028 LWP 2)
stacktrace:
ff052030
0

If I start a truss -p on the apache process (all processes) the request will be 
OK and reply a 200 OK message. After I've turned off all trusses, the 
errormessage is still there.

Then I need to restart apache and all cgi scripts are working fine again.

What can I do to solve this?

Regards, Magnar