modperl 2.0: apache crashes when running modperl script

2003-06-02 Thread arunappa


I get an Internal Server Error in the browser when trying
to access the URI /hello. 

Apache and modperl version:
Sun Jun 01 18:51:42 2003] [notice] Apache/2.0.46 (Unix) mod_perl/1.99_09 Perl/v5.8.0 
mod_ssl/2.0.46 OpenSSL/0.9.6b configured -- resuming normal operations

Relvant contents of perl.conf file:
PerlRequire /home/ravi/www/apache/modperl/startup.pl
Location /hello
SetHandler perl-script
PerlHandler Apache::hello
/Location

Contents of /home/ravi/www/apache/modperl/startup.pl:
use lib /home2/apache/www/html/modperl2/book/lincoln;
1;

Script hello.pm located at /home2/apache/www/html/modperl2/book/lincoln/Apache/hello.pm

Contents of hello.pm:
package Apache::hello;

use strict;

use Apache::RequestRec ();
use Apache::RequestIO ();

sub handler {
  my $request = shift;  # what does shift operate on @_?
  $request-content_type('text/html');

  $request-print(END);   # what does the ) do in print?
HTML
BODY
H1Hello There/H1
/BODY
/HTML
END

return Apache::OK;
}

1;

Relevant httpd error_log:
[Sun Jun 01 19:04:46 2003] [notice] child pid 2861 exit signal Segmentation fault (11)

Relevant http access_log:
127.0.0.1 - - [01/Jun/2003:19:04:46 -0400] GET /hello HTTP/1.1 500 670


I am not sure if the problem is with apache or modperl.
I could not find a core file under httpd ServerRoot.

Natarajan Murugaiyan(Ravi)



__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


Re: modperl 2.0: apache crashes when running modperl script

2003-06-02 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
I get an Internal Server Error in the browser when trying
to access the URI /hello. 

Apache and modperl version:
Sun Jun 01 18:51:42 2003] [notice] Apache/2.0.46 (Unix) mod_perl/1.99_09 Perl/v5.8.0 
mod_ssl/2.0.46 OpenSSL/0.9.6b configured -- resuming normal operations
When submitting bug reports, please follow these guidelines:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
[...]

package Apache::hello;

use strict;

use Apache::RequestRec ();
use Apache::RequestIO ();
sub handler {
  my $request = shift;  # what does shift operate on @_?
  $request-content_type('text/html');
  $request-print(END);   # what does the ) do in print?
HTML
BODY
H1Hello There/H1
/BODY
/HTML
END
return Apache::OK;
}
Where did you take this example from? you should return a constant Apache::OK, 
not a string Apache::OK. You need to import this constant before you can use 
it. Here is a skeleton:

use Apache::Const -compile = 'OK';

sub handler {
  ...
  return Apache::OK;
}
1;

Relevant httpd error_log:
[Sun Jun 01 19:04:46 2003] [notice] child pid 2861 exit signal Segmentation fault (11)
Relevant http access_log:
127.0.0.1 - - [01/Jun/2003:19:04:46 -0400] GET /hello HTTP/1.1 500 670
I am not sure if the problem is with apache or modperl.
I could not find a core file under httpd ServerRoot.
Take a look at:
http://perl.apache.org/docs/2.0/devel/debug/c.html#Getting_the_core_File_Dumped
__
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: modperl 2.0: apache crashes when running modperl script

2003-06-02 Thread Ged Haywood
Hi guys,

On Mon, 2 Jun 2003, Stas Bekman wrote:

  Sun Jun 01 18:51:42 2003] [notice] Apache/2.0.46 (Unix)
  mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.46 OpenSSL/0.9.6b

http://www.openssl.org/news/secadv_20030219.txt

73,
Ged.




Re: [OT] Apache::DBI and Postgres

2003-06-02 Thread valerian
On Wed, May 14, 2003 at 10:48:45AM -0400, Eric Sammer wrote:
 Not really a problem (yet), but out of curiousity...
 
 I'm using Apache::DBI with postgres and while not serving requests, all 
 the postgres processes are listed as idle in transaction. Obviously, 
 the DBI connect statements are configured with AutoCommit = 0. It 
 doesn't seem to cause any real problems, but it does concern me that 
 postgres considers itself in a transaction with only a connect (i.e. 
 prior to a $dbh-prepare()). I threw some SELECTs at it and it's fine, 
 but I worry about transaction blocking under heavier load and with 
 INSERT, DELETE, and UPDATE statements. ...or maybe I'm just thinking too 
 Oracle-ish about it.

I noticed an interesting problem with regards to dates and times.  If
you have columns that you let pgsql fill in, frex:

  Column  |Type |   Modifiers
--+-+---
 order_date   | date| default date('now'::text)
 order_time   | time with time zone | default ('now'::text)::time(6) with time zone

Those dates and times will tend to be off, because pgsql uses the
exact date/time at the _start_ of the transaction.  And with Apache::DBI
the transaction could have been started quite some time ago, unless your
server is heavily loaded and/or you do lots of SELECT queries before
adding new rows (thus making sure you end up with a relatively fresh
transaction).

Just to illustrate this, I first get the current time on my server:

dev= SELECT current_time;
   timetz

 20:11:20.787832-04

Then I go to my mod_perl application and add a new account.  The
resulting row has:

 order_date | order_time 
+
 2003-06-01 | 20:10:46.349862-04 

And order_time in this row is chronologically before, even though I
added the account _after_ typing 'SELECT current_time' in my psql
console...

The date can be off too, if Apache::DBI used an old, stale transaction
that started the previous day (this is very possible if a new record is
added alightly after midnight...)




Re: modperl 2.0: apache crashes when running modperl script

2003-06-02 Thread arunappa


__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


bug.rpt
Description: bug.rpt


mp2: session/auth handlers stable enough to use?

2003-06-02 Thread Carl Brewer


I'm looking at Apache::SessionX from Embperl as a possible
session tracker for an app I'm doing with Template::Toolkit,
has anyone any comments/suggestions re how mature this,
(or any other recommendations?) session tracking module
is under mp2?  I've read some comments on CPAN discussing
the use of tie() and performance, which I confess to
knowing nothing about.  Is any of this relevant to
mp2?  I want to avoid 100% any use of the compat stuff in
mp2, and make this as pure an mp2 site as possible.
thanks :)

Carl




RE: trouble with using $r-lookup_uri()

2003-06-02 Thread Frank Maas
 I'm trying to write a authentication handler using mod_perl, and am
 encountering some difficulty.  I have isolated my problem to the usage
 of the lookup_uri($uri) function call - whenever I call it, my module
 segfaults.  I have tested the input with both a variable string, and
 just a quoted string, and get the same result.

I don't know whether this will help you, but don't just focus on this
handler. I encountered problems using lookup_uri myself, because I did not
bear in mind that -lookup_uri goes through a request cycle itself, thus
calling a far lot of the handlers defined for that uri. However it is not
a complete request, so things like -pnotes etc. can fail. See
http://marc.theaimsgroup.com/?l=apache-modperlm=105118150200822w=2 for
my 'diary'.

--Frank


Missing html code using dynagzip

2003-06-02 Thread Scott Alexander
Hi,

When using

Files *.pl
SetHandler perl-script
PerlHandler Apache::RegistryFilter Apache::Dynagzip
PerlSetVar Filter On

PerlSetVar LightCompression On
Options +ExecCGI

PerlSetVar UseCGIHeadersFromScript Off
PerlSendHeader Off
PerlSetupEnv On
/Files

this setup with NN 6+ the code ends with

/html/html (yes twice) and in IE 6.0 it has just /html  (missing the
last '' With NN 4.8 it is the same as IE 6.0.

Does anyone know why this happens?

I've tried putting all my output into one print statement. Makes no
difference.

Scott







RE: unsubscribe request

2003-06-02 Thread Jamie . Echlin
unsubscribe modperl
end

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.



Re: unsubscribe request

2003-06-02 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
unsubscribe modperl


list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
__
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


[port to mp2] Apache::MP3

2003-06-02 Thread Stas Bekman
I've ported Apache::MP3 to mp2. I'm not submitting it as a patch yet, since I 
want to try to make the changes co-exist with mp1.

This package currently works only with mp2:

  http://stason.org/tmp/Apache-MP3-3.04.tar.gz

This a temporary location and will be gone once I submit the changes to 
Lincoln and he releases a new version.

I've also cleaned up the code to emit no warnings and be a bit less 
error-prone (as I tested with no so perfect mp3 files). Still there could be 
problems, but it should be good enough to start with.

p.s. Lincoln, do you have any changes since 3.03? If so, can you please send 
them to me so I work with the latest version. Thanks.

__
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