[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] File size limit with CGIs



At 10:30 AM 11/14/00, Adam Jenkins wrote:
>Hi!
>
>I have run into something which I was hoping someone could tell me 
>about. A couple of my scripts work very well when run as 
>applications, but as soon as they are converted to CGIs they give 
>"document contains no data" errors. It appears to be related to the 
>size of the output - if they are outputting a big file to the server 
>then it folds, but if they are outputting smaller files then 
>everything is ok. Is this a known problem? I'm running a G3, with 
>stacks of memory for MacPerl , OS 8.6 and Webstar 3.x, and teh 
>latest build of MacPerl. Would it be a MacPerl problem, a MacOS 
>problem, or something to do with Webstar?


This could be a memory problem, so check the CGI's own memory 
partition in Get Info, but in my experience using Mac web sharing as 
a test setup for CGIs that I deploy elsewhere, that error -- 
"document contains no data" -- comes from the web server when the CGI 
returns an error or warning instead of proper http output. You might 
want to run the same script directly, not as a CGI, and check your 
MacPerl output for warnings from the -w flag or from "use strict".

>... couple of my scripts work very well when run as applications...
You might get output that looks fine, but at the very end there will 
be some error/warning messages. Work on your script until those don't 
appear any more, and then convert to CGI.

Or, take the time to add to your script something like what CGI.pm 
provides for reporting out errors as http responses, making use of
   use CGI::Carp 'fatalsToBrowser';

HTH

1;

- Bruce

__Bruce_Van_Allen___bva@cruzio.com__Santa_Cruz_CA__

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org