AW: print throwing intermittent Segfaults

2009-11-23 Thread Denis Banovic
Hi Willian,

Thanks for your checklist, I've run through it, segfaults still there...
Right now it takes less then a minute from apache restart to the first segfault.
This is from the error_log from the RedHat 5 Production machine:

Apache2::RequestIO::print: (103) Software caused connection abort at 

The guys from rackspace are saying that I should recompile all my perl modules 
installed directly from CPAN ( see above ) , do you think this would help?
Or has someone another hint?

Thanks

Denis

-Ursprüngliche Nachricht-
Von: William T [mailto:dietbud...@gmail.com] 
Gesendet: Samstag, 21. November 2009 19:28
An: Denis Banovic
Cc: modperl@perl.apache.org
Betreff: Re: print throwing intermittent Segfaults

This is the list of stuff I usually start with when I get a problem that 
doesn't seem to be tied to a particular code path.

  * code path - perhaps a particular code path is only being exercised rarely, 
and it has a bug
  * forking - when child dies, all open descriptors in it's name space also get 
closed
  * eval - always a good thing to look at when weird things happen
  * persistancy - globals, closures, persistant objects, serialized/restored 
objects, shared memory, shared objects (between
processes)

-wjt



Von: Denis Banovic [mailto:denis.bano...@ncm.at] 
Gesendet: Samstag, 21. November 2009 10:43
An: modperl@perl.apache.org
Betreff: print throwing intermittent Segfaults


Hi Everybody,

I'm having big problems with mod_perl throwing intermittent Segmentation faults 
our production machines on RHEL 4  5.
To be able to produce a core dump on this segfaults I've installed mod_dumpcore 
from this tutorial:
http://mituzas.lt/2009/09/26/getting-apache-core-dumps-in-linux/

gdb /usr/sbin/httpd core.1 produces following output:

#0  0x00b29f4b in XS_Apache__RequestRec_content_type ()  from 
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/Apache/RequestRec/RequestRec.so

and very rarely ( 1 in 15 )

#0  0x003830b9 in apr_palloc () from /usr/lib/libapr-0.so.0


The content-type is set by
$r-content_type(text/html; charset=iso-8859-1) but this is not what is 
causing him to segfault...

By try and error I've figured out that the segfault happens when I do a
$r-print($mypagecontent);

I've even tried to do a
unless($r-connection-aborted) {
$r-print($mypagecontent);
}
 but this didn't help either.

The segfault happens randomly, between 30 and 250 mod_perl requests. There is 
no specific request URL or script that causes him to segfault, it just happens 
after some time.
More load on the server means more segfaults. 

From my Apache Config:
IfModule prefork.c
StartServers   8
MinSpareServers5
MaxSpareServers   20
ServerLimit  256
MaxClients   200
MaxRequestsPerChild  15
/IfModule

There are some additional Perl Modules that I've build from CPAN:
Compress-Zlib-2.004
Digest-MD5-2.39
Email-MIME-1.861
Email-MIME-ContentType-1.014
Email-MIME-Encodings-1.311
Email-Simple-2.004
Encode-Detect-1.01
ExtUtils-CBuilder-0.23
File-Slurp-.12
IO-Compress-Zlib-2.004
MIME-Base64-3.07
MIME-Types-1.24
Module-Build-0.2808
Pod-Escapes-1.04
Pod-Simple-3.07
String-Similarity-1.03
Template-Plugin-XML-Escape-0.02
Test-Pod-1.26
Test-Simple-0.80

Has anyone a hint where to start looking and what to do next to figure out why 
this segfault is happening?

Thanks

Denis


AW: print throwing intermittent Segfaults [ solved ]

2009-11-23 Thread Denis Banovic
Hi Morten,

Thanks a lot,

By putting an eval around the code I found out, that the segfault was produced 
by next request to the same child after the $r-print failed.
$r-print is still failing from time to time, but it's not producing segfaults 
anymore!

Thanks

Denis


-Ursprüngliche Nachricht-
Von: Morten Bjørnsvik [mailto:morten.bjorns...@experian-da.no] 
Gesendet: Montag, 23. November 2009 10:16
An: mod_perl list
Betreff: RE: AW: print throwing intermittent Segfaults

Hi

I've had a similar error I fixed it by adding an eval block around the 
offending code which was tracked back to MASON.

http://rt.cpan.org/Public/Bug/Display.html?id=49031

We compile everything from scratch apache,perl,mod_perl,mason, all modules by 
an automated build script. 

Earlier when we run on mod_perl1.99 and the redhat stack it worked fine.
But then we had other worries :-)

--
Morten Bjoernsvik, Developer, Decision Analytics


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: 23. november 2009 09:46
To: mod_perl list
Subject: Re: AW: print throwing intermittent Segfaults

Denis Banovic wrote:
 Hi Willian,
 
 Thanks for your checklist, I've run through it, segfaults still there...
 Right now it takes less then a minute from apache restart to the first 
 segfault.
 This is from the error_log from the RedHat 5 Production machine:
 
 Apache2::RequestIO::print: (103) Software caused connection abort at
 
 The guys from rackspace are saying that I should recompile all my perl 
 modules installed directly from CPAN ( see above ) , do you think this would 
 help?
 Or has someone another hint?
 
Just my grain of salt : in my own experience, 99% of the segfault 
cases I have encountered, was when Apache or Perl tried to run a piece of code 
not meant for this machine (such as a library meant for another machine or 
another OS version).
Maybe one of the modules you are using installed a wrong library ?
In that sense, the guys from rackspace may be right, although I believe that 
the CPAN modules don't generally contain object-code libraries, or else they do 
compile them at installation.
So maybe it is a library from the RHEL repository which is wrong.


print throwing intermittent Segfaults

2009-11-21 Thread Denis Banovic
Hi Everybody,
 
I'm having big problems with mod_perl throwing intermittent Segmentation faults 
our production machines on RHEL 4  5.
To be able to produce a core dump on this segfaults I've installed mod_dumpcore 
from this tutorial:
http://mituzas.lt/2009/09/26/getting-apache-core-dumps-in-linux/
 
gdb /usr/sbin/httpd core.1 produces following output:
 
#0  0x00b29f4b in XS_Apache__RequestRec_content_type ()  from 
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/Apache/RequestRec/RequestRec.so
 
and very rarely ( 1 in 15 )
 
#0  0x003830b9 in apr_palloc () from /usr/lib/libapr-0.so.0
 
 
The content-type is set by
$r-content_type(text/html; charset=iso-8859-1) but this is not what is 
causing him to segfault...
 
By try and error I've figured out that the segfault happens when I do a
$r-print($mypagecontent);
 
I've even tried to do a
unless($r-connection-aborted) {
$r-print($mypagecontent);
}
 but this didn't help either.
 
The segfault happens randomly, between 30 and 250 mod_perl requests. There is 
no specific request URL or script that causes him to segfault, it just happens 
after some time.
More load on the server means more segfaults. 
 
From my Apache Config:
IfModule prefork.c
StartServers   8
MinSpareServers5
MaxSpareServers   20
ServerLimit  256
MaxClients   200
MaxRequestsPerChild  15
/IfModule

There are some additional Perl Modules that I've build from CPAN:
Compress-Zlib-2.004
Digest-MD5-2.39
Email-MIME-1.861
Email-MIME-ContentType-1.014
Email-MIME-Encodings-1.311
Email-Simple-2.004
Encode-Detect-1.01
ExtUtils-CBuilder-0.23
File-Slurp-.12
IO-Compress-Zlib-2.004
MIME-Base64-3.07
MIME-Types-1.24
Module-Build-0.2808
Pod-Escapes-1.04
Pod-Simple-3.07
String-Similarity-1.03
Template-Plugin-XML-Escape-0.02
Test-Pod-1.26
Test-Simple-0.80
 
Has anyone a hint where to start looking and what to do next to figure out why 
this segfault is happening?
 
Thanks
 
Denis
 


AW: TinyMCE perl compressor

2007-04-26 Thread Denis Banovic
Hi Clint,

Thank you for making this possible, it works just fine under Firefox!

But Opera / IE6 / IE7 are making problems

Error: TinyMCE is not defined

Here is my Init:


script type=text/javascript src=/js/cms/tiny_mce_gzip.js/script
script type=text/javascript
tinyMCE_GZ.init({
plugins : 'preview,contextmenu,advlink',
themes  : 'advanced',
languages   : 'de',
disk_cache  : true,
});
/script
SCRIPT LANGUAGE=JavaScript
tinyMCE.init({
theme : advanced,
mode : specific_textareas,
textarea_trigger : convert,
language : de,
plugins : preview,contextmenu,advlink,
table_color_fields : true,
theme_advanced_layout_manager : SimpleLayout,
theme_advanced_buttons1 : 
preview,bold,italic,underline,separator,undo,redo,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,outdent,indent,separator,link,unlink,anchor,separator,cleanup,code,hr,removeformat,separator,previews,image,
theme_advanced_buttons2 : formatselect,
theme_advanced_styles : Header 1=header1;Header 2=header2;Header 
3=header3;Table Row=tableRow1,
theme_advanced_toolbar_align : left,
theme_advanced_blockformats : p,h1,h2,h3,
theme_advanced_toolbar_location : top,
cleanup: true,
external_image_list_url : /js/cms/myexternallist.js,
insertimage_callback : show_mmdb,
plugin_preview_width : 700,
plugin_preview_height : 650,
plugin_preview_pageurl : 
/index.pl?action=previewtype=emailid=239189language=de


});


I've installed it on CentOS 4.0 

You should maybe add File::Slurp to the list of required modules because it's 
not there by default.

Denis

-Ursprüngliche Nachricht-
Von: Clinton Gormley [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 25. April 2007 17:35
An: modperl
Betreff: TinyMCE perl compressor

Just a follow up to my previous announcement.

The TinyMCE perl compressor now has a permanent home:
http://hacks.traveljury.com/perl_compressor

any bugs to me: [EMAIL PROTECTED]

About

TinyMCE Compressor gzips all javascript files in TinyMCE to a single streamable 
file. This makes the overall download size 75% smaller and the number of 
requests will also be reduced. The overall initialisation time for TinyMCE will 
be reduced dramatically if you use this script.

Clint



AW: Growing Up

2007-04-18 Thread Denis Banovic
Hi!

Is it possible to configure Perlbal so there is no single point of failure?
I wanted to use perlbal as LB in front of few machines but decided to go with 2 
LB's because they can work in redundant mode.

Denis

-Ursprüngliche Nachricht-
Von: Frank Wiles [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 17. April 2007 18:46
An: Perrin Harkins
Cc: Clinton Gormley; modperl@perl.apache.org
Betreff: Re: Growing Up

On Tue, 17 Apr 2007 10:48:57 -0400
Perrin Harkins [EMAIL PROTECTED] wrote:

 On 4/17/07, Clinton Gormley [EMAIL PROTECTED] wrote:
  is it reasonable to serve your static files from a mod_perl server, 
  as long as you have a proxy/pound/squid in front?
 
 Yes, but spending no time in mod_perl for a static file is better than 
 spending a little time, and the files will be served faster if there's 
 no extra proxying step.  If you aren't having scaling problems, then 
 don't worry about it.

   Personally, I've fallen in love with Perlbal and it can serve up 
   static files from disk so that would be probably what I would do
   in this situation. 

 -
   Frank Wiles [EMAIL PROTECTED]
   http://www.wiles.org
 -



mod_perl hosting provider in Europe ?

2007-03-29 Thread Denis Banovic
Hi!
 
I was wondering if someone knows a good hosting provider with mod_perl
support in Europe / Germany / Austria? 
I've found this  http://perl.apache.org/help/isps.html but this seems
not to be really up2date anymore.
It is very important that the provider has good customer support. 
 
 
Thanks
 
Denis
 

 Think the web way
_ 

 Denis Banovic - CTO
 ncm.at - net communication management gmbh
 mailto:[EMAIL PROTECTED]
_ 
 Muehlstrasse 4a 
 5023 Salzburg 
 T +43.(0)662.644688
 http://www.ncm.at http://www.ncm.at/ 

 


AW: mod_perl: How pass variables (objects) from page to page?

2005-11-14 Thread Denis Banovic



You 
could use memcached, see Cache::Memcached on CPAN

it 
works great!

Denis


Von: Peter1 Alvin [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 15. November 2005 03:11An: 
modperl@perl.apache.orgBetreff: mod_perl: How pass variables 
(objects) from page to page?

Please tell me I can do this!

Using mod_perl, how do you keep Perl objects in RAM 
from page to page? I don't want to re-instantiate my objects on every page 
request, and I don't want the overhead of serializing my objects to a persistent 
store from page to page (I use A LOT of objects).

I've done extensive reseach and I've not found any 
"application space" to store objects indefinitly.

I can't believe Perl doesn't support keeping 
objects in RAM. This would de-qualify Perl for half of the projects I need 
to develop.

Peter Alvin


Reverse proxy

2005-09-06 Thread Denis Banovic
Hi everybody!

I have a simple reverse proxy question that might be slightly off topic
and I apologise for that!

Do you have to run 2 instances of apache when you want to profit from
the reverse proxy configuration?
Or is it enough to have 2 different Virtual Server running?

Thanks

Denis

Here is my config:
### Frontend
VirtualHost 192.168.200.178:80
DocumentRoot /home/vservers/mymon/
ServerName  frontend.test.at
RewriteEngine On
RewriteCond   %{REQUEST_URI} ^(.*)[^\.js]$ ### match anything except .js
files
RewriteRule /(.*?)$ http://127.0.0.1:8330/$1 [P]
Location /
Options FollowSymLinks ExecCGI Includes
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
/Location
/VirtualHost

### Backend Server with mod_perl 
VirtualHost 127.0.0.1:8330
DocumentRoot /home/vservers/knowledge_base/
ServerName  backend.test.at
Location /
Options FollowSymLinks ExecCGI Includes
PerlResponseHandler ModPerl::Registry
AddHandler perl-script .pl
/Location
/VirtualHost


AW: memory resident config hash

2005-08-26 Thread Denis Banovic
Use memcached, it just rocks and is just what you need...

http://www.danga.com/memcached/download.bml

Maybe you'll need this module...
needed module:
http://www.monkey.org/~provos/libevent/

If you get error when trying to start it, just symlink the libraries to the 
place he expects it...

Denis

-Ursprüngliche Nachricht-
Von: Octavian Rasnita [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 26. August 2005 16:04
An: modperl@perl.apache.org
Betreff: memory resident config hash


Hi,

I have a config file which contains a hash ref and I get its values by using
the do() function.

I don't think this is the best solution, because the speed might be slow.
That file is accessed on each access to each page.

Is it possible to store that hash in the memory somehow?

I can store that hash at the server startup or after that... doesn't matter.

Thank you.


Teddy




AW: [OT] viewing HTTP headers in IE/Firefox

2005-03-16 Thread Denis Banovic
Hi Tony,

I'm still using Naviscope for this, it small, fast and works with any Browser ( 
with proxy support ). 
By the way, has someone any ideas what happened to the company which was 
building naviscope?

Denis

-Ursprüngliche Nachricht-
Von: Tony Clayton [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 16. März 2005 14:51
An: modperl@perl.apache.org
Betreff: [OT] viewing HTTP headers in IE/Firefox


This is off-topic for this list, but I thought I'd just mention for those that
are troubleshooting HTTP issues, there are useful plugins for both IE and
Firefox that show you both incoming and outgoing HTTP headers, including through
https connections.

For IE, there is an IE Explorer Bar add-on called ieHTTPHeaders:
  http://www.blunck.info/iehttpheaders.html
You'll probably need to reboot after installing it for it to show up.

For Firefox, there is an extension called LiveHTTPHeaders:
  http://livehttpheaders.mozdev.org/
I think it might work with Mozilla as well, but I haven't tried it.

As always with software, use at your own risk.  They work great for me.

I thought this was of some relevance to this list, as many people using mod_perl
tend to do its powerful header management capabilities.

Tony


Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.2702 from 26.01.2005
Virus news: www.antiviruslab.com



AW: [mp2] query_string

2005-02-18 Thread Denis Banovic
Hi Will,

The simplest way is to get it out of the %ENV

Denis


-Ursprüngliche Nachricht-
Von: William Ross [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 18. Februar 2005 13:02
An: modperl@perl.apache.org
Betreff: [mp2] query_string


hello list.

very dumb question for you: with mod_perl2 and apreq2, what is the 
proper way to get the raw query string?

(I want to pass it through the login process.)

or is this Bad Thinking?

thanks

will



Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.2702 from 26.01.2005
Virus news: www.antiviruslab.com



[JOB] Perl/PHP Web application development

2005-02-04 Thread Denis Banovic
Title: [JOB] Perl/PHP Web application development






Hi!


We search a developer with good programming skills in (mod_)Perl / PHP for a full-time job in Salzburg, Austria. You should also have a working expirience with Linux and MySQL.

We are the biggest internet agency in western Austria. If you are interessted we can help you find a place to stay.


Send your application to mailto:[EMAIL PROTECTED]. 

Please send us your resume, examples of work that you have done, and anything else that will describe you.



Looking forward to seeing your application,


Denis Banovic



THINK THE WEB WAY.

---

 NCM - NET COMMUNICATION MANAGEMENT GmbH

---[ Denis Banovic - CTO

 mailto:[EMAIL PROTECTED]

---[ Mühlstrasse 4a

 AT - 5023 Salzburg

 Tel. 0662 / 644 688

---[ Fax: 0662 / 644 688 - 88 

 http://www.ncm.at

---



Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.2702 from 26.01.2005
Virus news: 
www.antiviruslab.com



AW: Logging user's movements

2005-02-04 Thread Denis Banovic
Hi Leo,

I have a very similar app running in mod_perl with about 1/2 mio hits a day. I 
need to do some optimisation, so I'm just interessted what optimisations that 
you are using brought you the best improvements.
Was it preloading modules in the startup.pl or caching the 1x1 gif image, or 
maybe optimising the database cache ( I'm using mysql ).
I'm sure you are also having usage peaks, so it would be interessting how many 
hits(inserts)/hour can a single server  machine handle approx.


Thanks

Denis





-Ursprüngliche Nachricht-
Von: Leo Lapworth [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 4. Februar 2005 10:37
An: ben syverson
Cc: modperl@perl.apache.org
Betreff: Re: Logging user's movements


H
On 4 Feb 2005, at 08:13, ben syverson wrote:

 Hello,

 I'm curious how the pros would approach an interesting system design  
 problem I'm facing. I'm building a system which keeps track of user's  
 movements through a collection of information (for the sake of  
 argument, a Wiki). For example, if John moves from the dinosaur page  
 to the bird page, the system logs it -- but only once a day per  
 connection between nodes per user. That is, if Jane then travels from  
 dinosaur to bird, it will log it, but if John travels moves back  
 to dinosaur from bird, it won't be logged. The result is a log of  
 every unique connection made by every user that day.

 The question is, how would you do this with the least amount of strain  
 on the server?

I think the standard approach for user tracking is a 1x1 gif, there are  
lots of ways of doing it, here are 2:

Javascript + Logs - update tracking when logs are processed
 
-

Use javascript to set a cookie (session or 24 hours) - if there isn't  
already one. Then use javascript to do a document write to the gif.

so /tracker/c.gif?c=user_session_idpage=dinosaur

It should then be fast (no live processing) and fairly easy to extract  
this information from the logs and into a db.

Mod_perl - live db updates
-
Alternatively if you need live updates create a mod_perl handle that  
sits at /tracker/c.gif, processes the parameters and puts them into a  
database, then returns a gif (I do this, read the gif in and store it  
as a global when the module starts so it just stays in memory). It's  
fast and means you can still get the benefits of caching with squid or  
what ever.

I get about half a million hits a day to my gif.

I think the main point is you should separate it from your main content  
handler if you want it to be flexible and still allow other levels of  
caching.

Cheers

Leo



Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.2702 from 26.01.2005
Virus news: www.antiviruslab.com



Cleanup_register

2004-12-08 Thread Denis Banovic
Hi everybody!

I have a small problem with the APR::Pool::cleanup_register;
I get this error_message: 
ModPerl::Registry: Usage: APR::Pool::cleanup_register(p, cv, arg=Nullsv) at 

In script a.pl it works fine, in other one I get this error message. 

Here is the piece of code:


use vars qw ($mydate %FORM %PARAM);

if ($ENV{MOD_PERL}) {
require APR::Pool;
init_globals();
shift-pool-cleanup_register(init_globals());
}


sub init_globals {

$mydate = undef;
%FORM = ();
%PARAM = ();
}


Any Ideas?

I'm running RedHat ES 3.0

Thanks

Denis

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---






Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.1429 from 08.12.2004
Virus news: www.antiviruslab.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



AW: SV: Moving STDOUT to a new handle?

2004-11-09 Thread Denis Banovic
Hi!

Try Filter::Handle

It redirects the STDOUT and overrides the print function

You'll have to change the sub PRINT function to make it work with perl 5.8

sub PRINT {
my $self = shift;
my $fh = *{ $self-{fh} };
#print $fh $self-{output}-(@_); ### won't work anymore
my $stdout = select;
select $fh;
write $self-{output}-(@_);
select $stdout;
}  


Denis

-Ursprüngliche Nachricht-
Von: Arne Skjaerholt [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 8. November 2004 23:20
An: Rob Kinyon; [EMAIL PROTECTED]
Betreff: SV: SV: Moving STDOUT to a new handle?


 From: Rob Kinyon [EMAIL PROTECTED]
 FYI: C::A has a plugin that will make it work (mostly) seamlessly with
 mod_perl called CGI::Application::Apache.

Hmm. I can't find CGI::Application::Apache on CPAN, only 
CGI::Application::Plugin::Apache, which, unfortunately for me, doesn't do any 
STDOUT magic either.

Arne
:wq



Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.915 from 08.11.2004
Virus news: www.antiviruslab.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



AW: [mp2] Content-Length: 0 / Location:

2004-08-05 Thread Denis Banovic
Hi!


I have following config:

Apache:

PerlResponseHandler ModPerl::Registry
AddHandler perl-script .pl


Perl script:

#!/usr/bin/perl
print Location: http://www.mydomain.at\n\n;;



Output with headers:

HTTP/1.1 200 OK
Connection: close
Date: Thu, 05 Aug 2004 08:59:59 GMT
Server: Apache/2.0.46 (Red Hat)
Content-Type: text/plain; charset=ISO-8859-1
Client-Date: Thu, 05 Aug 2004 08:59:45 GMT
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

Location: http://www.mydomain.at


What am I doing wrong?

I just want him to make a Redirect when somebody calls my script.

I've tried PerlSendHeader Off and On, nothing helped.


Thanks

Denis






-Ursprüngliche Nachricht-
Von: Geoffrey Young [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 4. August 2004 14:44
An: Denis Banovic
Cc: [EMAIL PROTECTED]
Betreff: Re: [mp2] Content-Length: 0




Denis Banovic wrote:
 Hi!
 
 I just got a new Server with apache 2.046 and mp2
 
 I have some problems when running under mod_perl, that Content-Length: 0 always 
 shows 0 Byte
 
 When running under cgi, content length is there.
 
 Has someone had something similar?
 
 Do I have to take care of the content_length?

no, apache automatically computes the content length of the request for you
(or does not if it finds that a C-L header is not required) so you no longer
should handle this yourself.

--Geoff

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


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



AW: AW: [mp2] Content-Length: 0 / Location:

2004-08-05 Thread Denis Banovic
Hi Geoffrey!

Thanks, that works fine.

It would be interresting to know how to do this in mod_perl style!


I have a Output object which captures the whole output.

On Destroy i'm doing something like this:


my @header = split(/\n/, $class-http_header);
foreach (@header) {
 $_ =~ /^(.*?)\: (.*?)$/s;
$class-{r}-headers_out-add($1,$2);  
  
}

There is also a function where I can set the Location header.

The only problem ist, that when I put this all together, there is a
Content-length: 0

and the redirect doesn't work. I have no Idea where this Content-length: 0 is comming 
from, I think it's from apache.

I've followed the last discussion about the C-L but could not find a sollution for it.

I wish everyone a nice weekend, 
CU in Zürich, the biggest party in Europe this weekend!

http://www.streetparade.ch

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---


-Ursprüngliche Nachricht-
Von: Geoffrey Young [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 5. August 2004 14:42
An: Denis Banovic
Cc: [EMAIL PROTECTED]
Betreff: Re: AW: [mp2] Content-Length: 0 / Location:



 What am I doing wrong?
 
 I just want him to make a Redirect when somebody calls my script.
 
 I've tried PerlSendHeader Off and On, nothing helped.

I don't have compat mode enabled, but

  PerlOptions +ParseHeaders

worked just fine for me:

Alias /perl-bin /apache/2.0/prefork/perl-5.8.5/cgi-bin
Location /perl-bin
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
/Location

HTH

--Geoff

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



[mp2] Content-Length: 0

2004-08-04 Thread Denis Banovic
Hi!

I just got a new Server with apache 2.046 and mp2

I have some problems when running under mod_perl, that Content-Length: 0 always shows 
0 Byte

When running under cgi, content length is there.

Has someone had something similar?

Do I have to take care of the content_length?

Thanks

Denis

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---


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



AW: Localtime DST / TZ question

2004-04-02 Thread Denis Banovic
Hi Trond,

Thanks for this solution, actually I'm using Class::Date module which uses the POSIX 
library for Date calculations, and normally it works great, except under mod_perl...
And extra calling of DateTime only to find out if the TimeZone settings are correct is 
a bit too slow I think. (I'm creating up to 100 date objects per request )

Is there any other way to tell mod_perl which time_zone to take?

Thanks

Denis

-Ursprüngliche Nachricht-
Von: Trond Michelsen [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 2. April 2004 16:11
An: Denis Banovic
Cc: [EMAIL PROTECTED]
Betreff: Re: Localtime DST / TZ question


On Fri, Apr 02, 2004 at 09:48:11AM +0200, Denis Banovic wrote:
 Can somebody please tell me, how to tell mod_perl to use a different time zone?

I prefer the DateTime module.

   use DateTime;

   my $dt = DateTime-now(time_zone = Europe/Oslo);
   print $dt-strftime(%a, %d %b %Y %H:%M:%S %z)'   


   Fri, 02 Apr 2004 16:04:28 +0200

This module takes care of both timezones and DST

-- 
Trond Michelsen


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



Localtime DST / TZ question

2004-04-01 Thread Denis Banovic
Hi!

I have a problem with the localtime function under mod_perl.

When I run this script in shell, I get the correct time and Daylight-Saving, but under 
mod_perl he is always using the local TimeZone of the system. ( Sever is in the US, 
I'm sitting in Europe )

Here is the script:


#!/usr/bin/perl

use strict;
use Data::Dumper;
$ENV{TZ} = 'CET';

my @array = localtime();
print Dumper (@array);
print \nDST: $array[8];
print TZ: $ENV{TZ}\n;


Can somebody please tell me, how to tell mod_perl to use a different time zone?

SetEnv in httpd.conf brought nothing...


Thanks

Denis

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---

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



AW: Using mysql

2003-09-26 Thread Denis Banovic
I would  use Apache::DBI.

Denis




Lust auf mehr - http://maedls.at

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 26. September 2003 08:19
An: [EMAIL PROTECTED]
Betreff: Using mysql


Is this the correct database package, DBI, to use with mod_perl 2?

Also is there a connection caching?

thanks,
-rkl


AW: is it mod or just perl?

2003-09-26 Thread Denis Banovic
If $ENV{MOD_PERL} is set, you are running under mod_perl
Otherwise, you are running normal perl


Lust auf mehr - http://maedls.at

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 26. September 2003 05:46
An: [EMAIL PROTECTED]
Betreff: is it mod or just perl?


how do i know i'm using mod_perl versus just perl?

thanks,
-rkl