Re: content-disposition not recognized

2004-11-19 Thread Stas Bekman
And it was already documented here:
http://perl.apache.org/docs/2.0/user/coding/coding.html#HTTP_Response_Headers
--
__
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: content-disposition not recognized

2004-11-19 Thread Stas Bekman
Micah Johnson wrote:
--- Stas Bekman <[EMAIL PROTECTED]> wrote:

Micah Johnson wrote:
[...]
print q[Content-type: text/plain\n] .
q[Content-Disposition:
attachment;filename=results.xml\n\n].

Thanks!
The local $| = 0 trick works.  Would you mind
explaining what is happening?  FYI, putting the
headers on one print doesn't seem to fix it.
Micah, please describe the outcome with the second
approach. Do you still 
get 500 or just the headers are wrong? should there
be a white space 
before 'filename='?

I inherited this CGI and just tried to make it work
as-is.  If I put it all in one line and remove all the
whitespace, it works without the buffering trick.
My apologies, you can't use q[] with \n, it must be qq[]. So this should 
work:
print qq[Content-type: text/plain\n] .
qq[Content-Disposition: attachment;filename=results.xml\n\n].
or even more readable:
print <
END
--
__
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: content-disposition not recognized

2004-11-19 Thread Micah Johnson

--- Stas Bekman <[EMAIL PROTECTED]> wrote:

> Micah Johnson wrote:
> [...]
> >>print q[Content-type: text/plain\n] .
> >>q[Content-Disposition:
> >>attachment;filename=results.xml\n\n].
> > 
> > 
> > Thanks!
> > The local $| = 0 trick works.  Would you mind
> > explaining what is happening?  FYI, putting the
> > headers on one print doesn't seem to fix it.
> 
> Micah, please describe the outcome with the second
> approach. Do you still 
> get 500 or just the headers are wrong? should there
> be a white space 
> before 'filename='?

I inherited this CGI and just tried to make it work
as-is.  If I put it all in one line and remove all the
whitespace, it works without the buffering trick.

Thanks again, you da man,
Micah



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.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: content-disposition not recognized

2004-11-19 Thread Stas Bekman
Micah Johnson wrote:
[...]
print q[Content-type: text/plain\n] .
q[Content-Disposition:
attachment;filename=results.xml\n\n].

Thanks!
The local $| = 0 trick works.  Would you mind
explaining what is happening?  FYI, putting the
headers on one print doesn't seem to fix it.
Micah, please describe the outcome with the second approach. Do you still 
get 500 or just the headers are wrong? should there be a white space 
before 'filename='?

--
__
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: content-disposition not recognized

2004-11-19 Thread Stas Bekman
Micah Johnson wrote:
and the script prints headers like this:
   print "Content-type: text/plain\n";
   print "Content-Disposition: attachment;
filename=results.xml\n\n";
The resulting file reports a server error 500,
premature end of script headers and the
content-disposition line is displayed, so it looks
like it is not being treated as a header.
Try to add:
  local $| = 0;
before sending headers, or send the header at once:
print q[Content-type: text/plain\n] .
q[Content-Disposition:
attachment;filename=results.xml\n\n].

Thanks!
The local $| = 0 trick works.  Would you mind
explaining what is happening?  FYI, putting the
headers on one print doesn't seem to fix it.
As soon as you send some content to the client, Apache sends the headers 
immediately (since there is no send_http_header() in Apache 2.0). So when 
you do:

print q[Content-type: text/plain\n];
Apache sends httpd headers right away, before it sees extra headers.
By making the output buffered $! (which is the case by default) you delay 
sending the data out, till the 8K buffer is filled (or the request is 
completed). But it's probably a better practice to send the header at once 
as I've suggested, rather than relying on the buffering feature.

--
__
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: content-disposition not recognized

2004-11-19 Thread Micah Johnson

> > and the script prints headers like this:
> > 
> > print "Content-type: text/plain\n";
> > print "Content-Disposition: attachment;
> > filename=results.xml\n\n";
> > 
> > The resulting file reports a server error 500,
> > premature end of script headers and the
> > content-disposition line is displayed, so it looks
> > like it is not being treated as a header.
> 
> Try to add:
> 
>local $| = 0;
> 
> before sending headers, or send the header at once:
> 
> print q[Content-type: text/plain\n] .
> q[Content-Disposition:
> attachment;filename=results.xml\n\n].

Thanks!
The local $| = 0 trick works.  Would you mind
explaining what is happening?  FYI, putting the
headers on one print doesn't seem to fix it.

--Micah



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.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: Urgent justification for perl

2004-11-19 Thread Matt Sergeant
On 19 Nov 2004, at 12:35, Martin Moss wrote:
I've had an urgent request for a few paragraphs on the
justification for the use of perl. In particularly
mod_perl.
Someone in the powers that be read an outdated
description and thinks that using perl is a security
risk - (I know, its not what you use, but how you use
it thats the security concern).
Any ideas?
We're a global security company. We scan email for spam and viruses for 
some places you may have heard of, like the UK government and the US 
Federal Reserve. About 50% of everything we do is in perl (including 
mod_perl/AxKit for our quarantine system). We're also BS/ISO-7799 if 
that's the sort of thing your powers that be need to hear.

Does that help?
Matt.
--
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: Urgent justification for perl

2004-11-19 Thread Steven Lembark

You better have one of those "powers that be" give those crazy folks at
amazon.com a call and let them know that they are using an insecure
product for their little shopping site.
Seriously though, amazon.com uses Mason
(http://www.masonhq.com/?AmazonDotCom) which uses mod_perl which uses
perl. They probably do more money based transactions per day than any
other web site (except perhaps ebay - not sure what they use), and they
trust mod_perl.
Not mod_perl specific, but most of the large financial houses
use perl+dbi for their work also. They don't publish the fact
(or much else about their internal workings) but our language
does the deed on Wall Street.
The perl advocacy group's 'success stores' page has quite a
few more.
--
Steven Lembark   85-09 90th Street
Workhorse ComputingWoodhaven, NY 11421
[EMAIL PROTECTED] 1 888 359 3508
--
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: Urgent justification for perl

2004-11-19 Thread Randal L. Schwartz
> "John" == John Wittkoski <[EMAIL PROTECTED]> writes:

John> Martin,
John> You better have one of those "powers that be" give those crazy folks at 
John> amazon.com a call and let them know that they are using an insecure 
John> product for their little shopping site.

And ticketmaster (gasp)!  How could a company that handles millions
of credit cards a day ever use something like Template Toolkit and
mod_perl!  They must be *crazy*!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
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: Bug Report: seg fault with 1.29/Apache 1.3.33/RedHat 7.1

2004-11-19 Thread Stas Bekman
[CC'ing Michael Schroeder who submitted a related patch to p5p
http://www.gossamer-threads.com/lists/perl/porters/187753]
Tim Evans wrote:
so at the moment the solution is to recompile perl with 
-DPERL_USE_SAFE_PUTENV

Does not work.
Michael, do you have any other solutions for Tim? He seems to have the 
same problem as you had with mod_perl/mod_php, but the suggestion to
recompile perl with -DPERL_USE_SAFE_PUTENV suggested at the URL:
http://www.phpbuilder.com/lists/php-install/2003092/0018.php
doesn't seem to work.

[EMAIL PROTECTED] apache_1.3.33]# perl -V:cppflags 
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include 
-I/usr/include/gdbm';

Fresh build of PHP 4.3.9; config.status has:
./configure  --with-apxs=/usr/local/apache/bin/apxs
Loads Apache HTML example page ok; simple test.php script runs w/o error showing 
PHP config

Rebuilt mod_perl with:
perl Makefile.PL USE_DSO=1
Let it build apache for me; apache's config.status says:
CC="cc" \
CFLAGS=" -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm" \
LDFLAGS_SHLIB_EXPORT="-Wl,-E" \
./configure \
"--with-layout=Apache" \
"--disable-rule=EXPAT" \
"--with-perl=/usr/local/bin/perl" \
"$@"

make test (all ok)
make install
Apache's httpd.conf has:
LoadModule php4_modulelibexec/libphp4.so
LoadModule perl_modulelibexec/libperl.so
Restart apache.
Seg faults on simple test.php page. Error log says (same as before):
[Thu Nov 18 20:48:17 2004] [notice] child pid 22818 exit signal Segmentation 
fault (11)
[...]
At this point, my client has instructed me to stop burning billable hours on 
this project--initial goal was to get an application called Request Tracker 
(http://www.bestpractical.com/rt/) running. I cannot disable PHP for this 
project, and can't use mod_perl either.

--
__
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: Urgent justification for perl

2004-11-19 Thread John Wittkoski


Martin Moss wrote on 11/19/04, 7:35 AM:

 > All,
 >
 > I've had an urgent request for a few paragraphs on the
 > justification for the use of perl. In particularly
 > mod_perl.
 >
 > Someone in the powers that be read an outdated
 > description and thinks that using perl is a security
 > risk - (I know, its not what you use, but how you use
 > it thats the security concern).
 >
 > Any ideas?


Martin,
You better have one of those "powers that be" give those crazy folks at 
amazon.com a call and let them know that they are using an insecure 
product for their little shopping site.

Seriously though, amazon.com uses Mason 
(http://www.masonhq.com/?AmazonDotCom) which uses mod_perl which uses 
perl. They probably do more money based transactions per day than any 
other web site (except perhaps ebay - not sure what they use), and they 
trust mod_perl.

Sorry, I know that's probably not a good "reason", but it is a good example.


--John


-- 
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: content-disposition not recognized

2004-11-19 Thread Stas Bekman
Micah Johnson wrote:
I am having difficulty sending an XML file to the
browser using the Content-Disposition: attachment
header.
I am running mod_perl/1.99_13 and trying to use an
existing cgi script which returns data in various
forms.  One is an XML file.  The script is found in a
directory setup like this:

   SetHandler perl-script
   PerlResponseHandler ModPerl::PerlRun
   PerlOptions +ParseHeaders
   Options ExecCGI

and the script prints headers like this:
print "Content-type: text/plain\n";
print "Content-Disposition: attachment;
filename=results.xml\n\n";
The resulting file reports a server error 500,
premature end of script headers and the
content-disposition line is displayed, so it looks
like it is not being treated as a header.
Try to add:
  local $| = 0;
before sending headers, or send the header at once:
print q[Content-type: text/plain\n] .
q[Content-Disposition: attachment;filename=results.xml\n\n].
Any suggestions on how to fix this?
Unrelated, better upgrade to the latest 1.99_17, to avoid problems that 
were already fixed.

--
__
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: Urgent justification for perl

2004-11-19 Thread Jonathan Vanasco
I think you're getting mod_perl confused with mod girls.  They wear 
white boots, and pose in magazines.

On Nov 19, 2004, at 2:17 PM, [EMAIL PROTECTED] wrote:
3) it seem's sexy
one of those is a 'valid reason' above all others, see if
you can tell which one ;>
regards
Steph

--
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: Re: Urgent justification for perl

2004-11-19 Thread stef

I know this is going to be taken seriously, but, jst incase
any of you out there are unsure -> this is a joke <-. your
reading of this implies that you have some humour :)

Reasons to use mod_perl
1) its like perl, but with extra bits, like the word 'mod'
before it, and an underline.
2) its faster than any other language, even assembler!
especially if you use Inline inside mod_perl.
3) it seem's sexy
4) it has a name that allows you to 'one up' other programmers
('you do perl eh ? well i do -mod- perl, much harder')
5) its not asp (actually, thats almost not a joke reason ;)
6) its open source (as in beer, women, cars and speech).
7) you can program in it better than other languages.
8) its a security risk (this allows you to break into your
program from outside, helpful if your doing finance
sector programming).
9) its byzantium and cryptic, thus enabling you to write
yourself into a job for life.

one of those is a 'valid reason' above all others, see if
you can tell which one ;>

regards
Steph

>  Original Message 
> Subject: Re: Urgent justification for perl
> From: "Jonathan Vanasco" <[EMAIL PROTECTED]>
> Date: Fri, November 19, 2004 1:59 pm
> To: "Martin Moss" <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> 
> Justification using perl/mod_perl for what, and opposed to what?
> A security risk in what way?
> 
> 
> There's a 'Success Stories' page here, that might have some things you 
> want/need:
> http://perl.apache.org/outstanding/index.html
> 
> 
> 
> 
> 
> On Nov 19, 2004, at 7:35 AM, Martin Moss wrote:
> 
> > All,
> >
> > I've had an urgent request for a few paragraphs on the
> > justification for the use of perl. In particularly
> > mod_perl.
> >
> > Someone in the powers that be read an outdated
> > description and thinks that using perl is a security
> > risk - (I know, its not what you use, but how you use
> > it thats the security concern).
> >
> > Any ideas?
> >
> > Marty
> >
> >
> > 
> > ___
> > Moving house? Beach bar in Thailand? New Wardrobe? Win £10k with 
> > Yahoo! Mail to make your dream a reality.
> > Get Yahoo! Mail www.yahoo.co.uk/10k
> >
> > -- 
> > 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


-- 
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: Urgent justification for perl

2004-11-19 Thread Perrin Harkins
On Fri, 2004-11-19 at 07:35, Martin Moss wrote:
> Someone in the powers that be read an outdated
> description and thinks that using perl is a security
> risk - (I know, its not what you use, but how you use
> it thats the security concern). 
> 
> Any ideas?

man perlsec to start with.  There is plenty of Perl advocacy out there
on various sites if you Google for it.  If you have a specific concern
that isn't covered well elsewhere, let us know what it is.

- Perrin


-- 
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: Urgent justification for perl

2004-11-19 Thread Jonathan Vanasco
Justification using perl/mod_perl for what, and opposed to what?
A security risk in what way?
There's a 'Success Stories' page here, that might have some things you 
want/need:
http://perl.apache.org/outstanding/index.html



On Nov 19, 2004, at 7:35 AM, Martin Moss wrote:
All,
I've had an urgent request for a few paragraphs on the
justification for the use of perl. In particularly
mod_perl.
Someone in the powers that be read an outdated
description and thinks that using perl is a security
risk - (I know, its not what you use, but how you use
it thats the security concern).
Any ideas?
Marty
		
___
Moving house? Beach bar in Thailand? New Wardrobe? Win £10k with 
Yahoo! Mail to make your dream a reality.
Get Yahoo! Mail www.yahoo.co.uk/10k

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


Urgent justification for perl

2004-11-19 Thread Martin Moss
All,

I've had an urgent request for a few paragraphs on the
justification for the use of perl. In particularly
mod_perl.

Someone in the powers that be read an outdated
description and thinks that using perl is a security
risk - (I know, its not what you use, but how you use
it thats the security concern). 

Any ideas?

Marty



___ 
Moving house? Beach bar in Thailand? New Wardrobe? Win £10k with Yahoo! Mail to 
make your dream a reality. 
Get Yahoo! Mail www.yahoo.co.uk/10k

-- 
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: Bug Report: seg fault with 1.29/Apache 1.3.33/RedHat 7.1

2004-11-19 Thread Joe Schaefer
Tim Evans <[EMAIL PROTECTED]> writes:

> Let it build apache for me; apache's config.status says:

[...]

> "--with-layout=Apache" \

[...]

> Attaching to program: /usr/sbin/httpd, process 22798

Wrong httpd binary- the symbols in that stack trace
are from a 2.0 server.  Your server's path should be

/usr/local/apache/bin/httpd

-- 
Joe Schaefer


-- 
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: Bug Report: seg fault with 1.29/Apache 1.3.33/RedHat 7.1

2004-11-19 Thread ___cliff rayman___

Tim Evans wrote:
LoadModule php4_modulelibexec/libphp4.so
LoadModule perl_modulelibexec/libperl.so
Restart apache.
Seg faults on simple test.php page. Error log says (same as before):
[Thu Nov 18 20:48:17 2004] [notice] child pid 22818 exit signal Segmentation 
fault (11)

 

I always build my webservers in 3 parts.  The front end contains SSL, 
mod_proxy and mod_rewrite. , Then one each modperl and php on the 
backends.  It's like keeping kids separated in the backseat.  If there 
is enough distance between them, they won't fight.

Cliff
--
[EMAIL PROTECTED]

--
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: push_handler with Apache::ModuleConfig

2004-11-19 Thread Geoffrey Young


Xavier wrote:
> Hello,
> 
> for best look, I'd like to replace :
> 
> PerlInitHandler My::Module
>   with
> MyModule On

these are not the same thing, so they will not have the same effect.

both are parsed and executed only once - when you start the server. well,
ok, twice, but who's counting :)  they will also be executed each time you
restart the server.

however, the PerlInitHandler directive tells mod_perl to run My::Module for
each request during the post-read phase.  a custom directive will not be
able to do that for you.

> 
> I've done the XS file using Apache::ExtUtils, but I don't know how to
> write the "MyModule" sub. Is there any entry in the $cfg object to do it?
> 
> sub MyModule {
> my($cfg,$parms,$arg)[EMAIL PROTECTED];
> $cfg->{__WHAT__} = \&myhandler if($arg);
> }
> 
> With Google, I've found scripts using "$cfg->{handler}", but they're
> calling a standard handler, not a Perl one; I've neither found any doc
> about the "per-directory/server" $cfg class.

perl directive handlers are _only_ an access to the httpd.conf parsing
process - they do not register your module nor tell it when to run.
therefore you will always need two directives if you want some request-time
action.  at least not with mod_perl 1.0 - in mp2 you should be able to use
Apache::Module::add_config to push the PerlInitHandler into the config for you.

see recipes 7.8, 7.10, and 7.11 for a few more examples of using directive
handlers:

  http://www.modperlcookbook.org/chapters/ch07.pdf

the code for each of these is also available

  http://www.modperlcookbook.org/code/ch07/

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



content-disposition not recognized

2004-11-19 Thread Micah Johnson
I am having difficulty sending an XML file to the
browser using the Content-Disposition: attachment
header.

I am running mod_perl/1.99_13 and trying to use an
existing cgi script which returns data in various
forms.  One is an XML file.  The script is found in a
directory setup like this:


   SetHandler perl-script
   PerlResponseHandler ModPerl::PerlRun
   PerlOptions +ParseHeaders
   Options ExecCGI


and the script prints headers like this:

print "Content-type: text/plain\n";
print "Content-Disposition: attachment;
filename=results.xml\n\n";

The resulting file reports a server error 500,
premature end of script headers and the
content-disposition line is displayed, so it looks
like it is not being treated as a header.

Any suggestions on how to fix this?

Thanks,
Micah Johnson




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.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: Bug Report: seg fault with 1.29/Apache 1.3.33/RedHat 7.1

2004-11-19 Thread Tim Evans

>so at the moment the solution is to recompile perl with 
>-DPERL_USE_SAFE_PUTENV

Does not work.

[EMAIL PROTECTED] apache_1.3.33]# perl -V:cppflags 
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe 
-I/usr/local/include 
-I/usr/include/gdbm';

Fresh build of PHP 4.3.9; config.status has:

./configure  --with-apxs=/usr/local/apache/bin/apxs

Loads Apache HTML example page ok; simple test.php script runs w/o error 
showing 
PHP config

Rebuilt mod_perl with:

perl Makefile.PL USE_DSO=1

Let it build apache for me; apache's config.status says:

CC="cc" \
CFLAGS=" -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm" \
LDFLAGS_SHLIB_EXPORT="-Wl,-E" \
./configure \
"--with-layout=Apache" \
"--disable-rule=EXPAT" \
"--with-perl=/usr/local/bin/perl" \
"$@"

make test (all ok)
make install

Apache's httpd.conf has:

LoadModule php4_modulelibexec/libphp4.so
LoadModule perl_modulelibexec/libperl.so

Restart apache.

Seg faults on simple test.php page. Error log says (same as before):

[Thu Nov 18 20:48:17 2004] [notice] child pid 22818 exit signal Segmentation 
fault (11)


[EMAIL PROTECTED] root]# gdb httpd 
GNU gdb Red Hat Linux (6.1post-1.20040607.17rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols 
found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".

Attaching to program: /usr/sbin/httpd, process 22798
0x0083d5e8 in ?? ()

[ attempt to load test.php here returns nothing in browser ]

(gdb) bt
#0  0x0083d5e8 in ?? ()
#1  0x0089ce98 in ?? ()
#2  0xbfffadf4 in ?? ()
#3  0x0001 in ?? ()
#4  0x08074be0 in ap_calc_scoreboard_size ()
#5  0x in ?? ()
#6  0x in ?? ()
#7  0x in ?? ()
#8  0x in ?? ()
#9  0xbfffacb0 in ?? ()
#10 0xbfffacdc in ?? ()
#11 0x0001 in ?? ()
#12 0x08074b82 in ap_run_pre_mpm ()
#13 0x0809d854 in ?? ()
#14 0xbfffacc4 in ?? ()
#15 0x0001 in ?? ()
#16 0x in ?? ()
#17 0x in ?? ()
#18 0x0009eb10 in ?? ()
#19 0xbffface8 in ?? ()
#20 0x08076f0c in ap_content_length_filter ()
#21 0xbfffacdc in ?? ()
#22 0x0809d6fa in ?? ()
#23 0xbffface8 in ?? ()
#24 0x08077012 in ap_content_length_filter ()
#25 0x09f47024 in ?? ()
#26 0x in ?? ()
#27 0x in ?? ()
#28 0x0806c57b in ap_read_pid ()
#29 0x0809d697 in ?? ()
#30 0x in ?? ()
#31 0xbfffad68 in ?? ()
#32 0x08077618 in ap_rflush ()
#33 0x0001 in ?? ()
#34 0xbfffadf4 in ?? ()
#35 0xbfffad68 in ?? ()
#36 0x080775ed in ap_rflush ()
#37 0x in ?? ()
#38 0x in ?? ()
#39 0x in ?? ()
#40 0x in ?? ()
#41 0x0177ff8e in ?? ()
#42 0xbfffada0 in ?? ()
#43 0x0048b710 in ?? ()
#44 0x in ?? ()
#45 0x in ?? ()
#46 0x007730cc in ?? ()
#47 0xb75e64f8 in ?? ()
#48 0x in ?? ()
---Type  to continue, or q  to quit---
#49 0x0089d378 in ?? ()
#50 0x080ab6e0 in ?? ()
#51 0xbfffad48 in ?? ()
#52 0x0804e945 in ?? ()
#53 0xbfffeb2c in ?? ()
#54 0x in ?? ()
#55 0xbfffad68 in ?? ()
#56 0x in ?? ()
#57 0x007927c3 in ?? ()
#58 0x0089ce98 in ?? ()
#59 0x00482c90 in ?? ()
#60 0x0089ce98 in ?? ()
#61 0xbfffadf4 in ?? ()
#62 0x0001 in ?? ()
#63 0xbfffadc8 in ?? ()
#64 0x0077d79d in ?? ()
#65 0x0001 in ?? ()
#66 0xbfffadf4 in ?? ()
#67 0xbfffadfc in ?? ()
#68 0x in ?? ()
#69 0x0089ce98 in ?? ()
#70 0x0048b020 in ?? ()
#71 0x08094354 in ?? ()
#72 0xbfffadc8 in ?? ()
#73 0xbfffad70 in ?? ()
#74 0x0077d75f in ?? ()
#75 0x in ?? ()
#76 0x in ?? ()
#77 0x in ?? ()
#78 0x0048b518 in ?? ()
#79 0x0001 in ?? ()
#80 0x0804f288 in ?? ()
#81 0x in ?? ()
#82 0x00482300 in ?? ()
#83 0x0077d6bb in ?? ()
#84 0x0048b518 in ?? ()
#85 0x0001 in ?? ()
#86 0x0804f288 in ?? ()
#87 0x in ?? ()
#88 0x0804f2a9 in ?? ()
#89 0x08077290 in ap_old_write_filter ()
#90 0x0001 in ?? ()
#91 0xbfffadf4 in ?? ()
#92 0x08094354 in ?? ()
#93 0x0809439c in ?? ()
#94 0x00482c90 in ?? ()
#95 0xbfffadec in ?? ()
#96 0x004890d3 in ?? ()
#97 0x0001 in ?? ()
---Type  to continue, or q  to quit---

[ pages and pages more of this, ending with ]

#5341 0x in ?? ()
#5342 0x in ?? ()
#5343 0x in ?? ()
#5344 0x in ?? ()
#5345 0x in ?? ()
#5346 0x in ?? ()
#5347 0x in ?? ()
#5348 0x in ?? ()
Cannot access memory at address 0xc000
(gdb) 

At this point, my client has instructed me to stop burning billable hours on 
this project--initial goal was to get an application called Request Tracker 
(http://www.bestpractical.com/rt/) running. I cannot disable PHP for this 
project, and can't use mod_perl either.

Not sur