Apache::ASP grabbing STDIN (fwd)
scott at ruralnetwork.net
scott at ruralnetwork.net
Wed Mar 24 22:41:54 PST 2004
Hey Ivan,
Perhaps you would be the best person to follow up with the author of
Apache::ASP on how it's used in Freeside?
--
Scott Langley
scott at ruralnetwork.net
Systems Administrator
Rural Network Services
----------Forwarded message ----------
Date: Wed, 24 Mar 2004 21:52:29 -0800
From: Josh Chamas <josh at chamas.com>
To: scott at ruralnetwork.net
Subject: Re: Apache::ASP grabbing STDIN
Thanks for the follow up Scott. The solution seems to be fine,
the only problem being that the $Request->Form data will not be
set up correctly for the Apache::ASP request, but besides that
things should be fine. I should have thought of this config for
you myself, but its a new one. :(
If you would not mind sharing, how do you use Freeside with Apache::ASP?
I would like to research this further on my own time so that this will
work for you.
Regards,
Josh
scott at ruralnetwork.net wrote:
>
> ----------Forwarded message ----------
> From: scott at ruralnetwork.net
> To: ivan-freeside at sisd.com
> Subject: Re: Error: Illegal or empty (text)
> Date: Wed, 24 Mar 2004 18:00:12 GMT
> Yes, that does work! (That is, adding "PerlSetVar RequestBinaryRead
> Off" to the httpd.conf file, which I put right after the "PerlSetVar
> Global /usr/local/etc/freeside/asp-global/" statement; and then putting
> /usr/local/etc/freeside/asp-global/global.asa back the way it was before
> with:
> $cgi = new CGI;
> instead of the workaround I tried of:
> $cgi = new CGI(\*STDIN);
> Similarly, the original Apache::ASP cgi.htm example also works when
> using the "PerlSetVar RequestBinaryRead Off" directive.
> Thanks Ivan!
> I'll pass this on to the mod-perl list, as well.
> --
> Scott Langley
> scott at ruralnetwork.net
> Systems Administrator
> Rural Network Services
> ivan writes:
>
>> Does setting "PerlSetVar RequestBinaryRead Off" (available in
>> Apache::ASP 2.55 and later) fix this problem for you?
>> --
>> _ivan
>>
>> On Tue, Mar 23, 2004 at 10:57:22PM +0000, scott at ruralnetwork.net wrote:
>>
>>> Below is an update on what I found out on the interaction between
>>> Freeside, CGI.pm >= 3.00 and Apache::ASP. For now, I would suggest
>>> using HTML::Mason install of Apache::ASP with Freeside 1.4.1.
>>> --
>>> Scott Langley
>>> scott at ruralnetwork.net
>>> Systems Administrator
>>> Rural Network Services
>>> ----------Forwarded message ----------
>>> From: scott at ruralnetwork.net
>>> To: Josh Chamas <josh at chamas.com>
>>> Subject: Re: Apache::ASP grabbing STDIN
>>> Date: Sat, 20 Mar 2004 21:59:14 GMT
>>> Josh Chamas writes:
>>> >I did this hack for Apache::ASP so that people could more easily port
>>> >CGI script by just wrapping <% %> around them. Since Apache::ASP calls
>>> >read() and consumes the input, I don't see how I could get it to work
>>> >with Apache::Request, but I am not sure it is something developer. >
>>> >One work around for those having problems with CGI might be to use
>>> >this API instead: >
>>> > $query = new CGI(\*STDIN); >
>>> >Scott, does this work for your situation? Can you get the Apache::ASP
>>> >examples to work with this change on your installation? >
>>> >Regards, >
>>> >Josh
>>> >________________________________________________________________________
>>>
>>> >Josh Chamas, Founder | NodeWorks - http://www.nodeworks.com
>>> >Chamas Enterprises Inc. | NodeWorks Directory -
>>> http://dir.nodeworks.com
>>> >http://www.chamas.com | Apache::ASP - http://www.apache-asp.org >
>>> When I try what you suggested in the Apache::ASP cgi.htm example, I get
>>> a runaway httpd process that consumes around 90% of the CPU and no
>>> ouput returned to the browser. The last lines that appears in the
>>> Apache error log are:
>>> [error] [asp] [3813] [debug] [1079816560.7241;0.0015] [cgi.htm] -
>>> Script_OnStart /var/www/asp/eg/cgi.htm in global.asa
>>> [error] [asp] [3813] [debug] [1079816560.7247;0.0006] executing
>>> CODE(0x85d92e8)
>>> This example uses CGI this way:
>>> use CGI qw(:standard);
>>> When I try what you suggested in the real Apache::ASP application
>>> that I want to work, the ISP customer management software package
>>> Freeside,
>>> http://www.sisd.com/freeside/, I get:
>>> [error] [asp] [2098] [error] Can't locate object method "READLINE"
>>> via package "Apache::ASP::Request" at /usr/lib/perl5/5.8.3/CGI.pm
>>> line 510. <--> , /usr/lib/perl5/site_perl/5.8.3/Apache/ASP.pm line
>>> 1518
>>> This code uses CGI this way:
>>> use CGI;
>>> where:
>>> $query = new CGI(\*STDIN);
>>> is called in the Script_OnStart method of the application's
>>> global.asa file.
>>> Both of these tests were done with Apache::ASP 2.57 and CGI 3.04.
>>> Do you have any other suggetsions?
>>> --
>>> Scott Langley
>>> scott at ruralnetwork.net
>>> Systems Administrator
>>> Rural Network Services
>>
>>
>> --
>> _ivan
>
>
> --
> Scott Langley
> scott at ruralnetwork.net
> Systems Administrator
> Rural Network Services
More information about the freeside-users
mailing list