You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Pat Eyler <pa...@eylerfamily.org> on 2004/02/12 04:33:24 UTC

? with mod_perl on OS X

Hi,
I'm trying to get mod_perl running on my OS X (panther) system, and am
running into some issues with IO.  I've got a trivial script which runs
properly as a cgi, but fails under Apache::PerlRun or Apache::Registry:

print "Content-type:  text/plain\n\n";
print "foo\n";

if i do this:

my $r = shift;
$r->send_http_header('text/plain');
$r->print("foo");
return OK;


it works fine under Apache::Registry.

Anyone have a clue to share?

thanks,
-pate

Pat Eyler
Kaitiaki/manager               migrant Linux sys admin
the Koha project               ruby, shell, and perl geek
http://www.koha.org            http://pate.eylerfamily.org


-- 
Reporting bugs: 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: ? with mod_perl on OS X

Posted by Stas Bekman <st...@stason.org>.
Ged Haywood wrote:
> Hi Stas,
> 
> On Thu, 12 Feb 2004, Stas Bekman wrote:
> 
> 
>>Just to add to Pat's report. The issue is with tied STDOUT and has something 
>>to do with perl. Someone else had a similar problem and they said the problem 
>>has gone away after recompiling perl.
> 
> 
> Ah, I think I remember - was it something to do with useperlio?

Could be. They never supplied the details. So yes, trying to rebuild perl w/o 
perlio could be an option to try.
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org 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: ? with mod_perl on OS X

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi Stas,

On Thu, 12 Feb 2004, Stas Bekman wrote:

> Just to add to Pat's report. The issue is with tied STDOUT and has something 
> to do with perl. Someone else had a similar problem and they said the problem 
> has gone away after recompiling perl.

Ah, I think I remember - was it something to do with useperlio?

73,
Ged.


-- 
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: ? with mod_perl on OS X

Posted by Stas Bekman <st...@stason.org>.
Just to add to Pat's report. The issue is with tied STDOUT and has something 
to do with perl. Someone else had a similar problem and they said the problem 
has gone away after recompiling perl.

If noone on this list has a solution, purhaps there will be more luck at the 
macosx or p5p lists? I suppose it should be possible to write a simple 
tiehandle example that reproduces the problem outside modperl.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org 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: ? with mod_perl on OS X

Posted by Pat Eyler <pa...@eylerfamily.org>.
Ged,
you're right, that was a terrible problem report.  I'm away from my Mac OS
X machine atm, but I'll answer what I can now and fill in the blanks later
on.

On Thu, 12 Feb 2004, Ged Haywood wrote:

> Hi there,
>
> On Wed, 11 Feb 2004, Pat Eyler wrote:
>
> > I'm trying to get mod_perl running on my OS X (panther) system, and am
> > running into some issues with IO.  I've got a trivial script which runs
> > properly as a cgi, but fails under Apache::PerlRun or Apache::Registry:
> > ...
> > Anyone have a clue to share?
>
> Firstly "this doesn't work" is a useless description of your problem.
> Please give more information about what you mean.  For example there
> are logs produced by Apache when requests arrive, is there anything
> helpful in them?  At the bottom of every message sent out by the
> mod_perl list server there's a link about reporting problems.  You
> should look at that and report the information requested, especially
> things like what versions of mod_perl and Apache you're using.
>

There are no log entries in the error_log, i didn't think to look in the
access_log.  The failure is that no content is sent to the browser
(safari) which give a message along the lines of "couldn't load data from
source".  I know the permissions are okay, and that the script works as I
can run it by hand or from mod_cgi and get my expected output.

I don't remember the version numbers off the top of my head, but it is the
stock Apache and mod_perl that come with OS X Panther.  I'll grab version
numbers once I get home.

> Secondly there are lots of ways to debug problems, and a whole section
> in the mod_perl guide to help you to help yourself that way.  Read it
> and enjoy the debugging (debugging is often the most interesting part
> to me, which gives you some idea of how interesting I find developing
> Web software:).  For example you can print to STDERR from your script
> and see the messages in the error_log - or you should be able to.
>

The script itself works.  It only fails when run through mod_perl (again,
either in PerlRun or Registry).

> Thirdly I think it's unlikely that your problem has anything to do
> with the operating system.  The one you're using is less popular than
> some others I could mention, so mod_perl is less well exercised on it
> and you might need to prepare yourself for the odd surprise in future,
> but OTOH any reports of successes and failures on your system will be
> welcome here.

I included the OS only because I'm using the stock binaries, and am half
guessing that they're broken in some way.  The fact that a Perl script
consisting of two print statements won't produce any output under
mod_perl, but will under mod_cgi, and that using the

$r->send_http_header('text/plain');
$r->print("foo");

syntax to do the same thing does work leads me to believe it's an artifact
of my binaries.  I'm loathe to go off and rebuild them though without
getting some guidance from the tribal elders first (Is there a known
issue, is there a work-around, do I need a special incantation when
building to make things work correctly, etc.)  I wasn't able to find
anything promising in the archives or google after a quick search, so I
thought I'd ask here.

thanks,
-pate

>
> 73,
> Ged.
>
>



-- 
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: ? with mod_perl on OS X

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,

On Wed, 11 Feb 2004, Pat Eyler wrote:

> I'm trying to get mod_perl running on my OS X (panther) system, and am
> running into some issues with IO.  I've got a trivial script which runs
> properly as a cgi, but fails under Apache::PerlRun or Apache::Registry:
> ...
> Anyone have a clue to share?

Firstly "this doesn't work" is a useless description of your problem.
Please give more information about what you mean.  For example there
are logs produced by Apache when requests arrive, is there anything
helpful in them?  At the bottom of every message sent out by the
mod_perl list server there's a link about reporting problems.  You
should look at that and report the information requested, especially
things like what versions of mod_perl and Apache you're using.

Secondly there are lots of ways to debug problems, and a whole section
in the mod_perl guide to help you to help yourself that way.  Read it
and enjoy the debugging (debugging is often the most interesting part
to me, which gives you some idea of how interesting I find developing
Web software:).  For example you can print to STDERR from your script
and see the messages in the error_log - or you should be able to.

Thirdly I think it's unlikely that your problem has anything to do
with the operating system.  The one you're using is less popular than
some others I could mention, so mod_perl is less well exercised on it
and you might need to prepare yourself for the odd surprise in future,
but OTOH any reports of successes and failures on your system will be
welcome here.

73,
Ged.



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