>At 14:43 6/8/96, Shawn Pearce wrote: >> >>>> Is there a limit to the size a script can be in order to run as a CGI >>>> with WebStar. I thought I read somewhere that the limit is 60k, >>>> although files over 40k are problematic. I can't run a script that >>>> is 43k, and it is driving me crazy! >>> >>>There is no limit of that kind. >> >>Yes, ther eis. The limit of the script is the size that a TEXT resource >>can hold. The CGI glue stores the script in a TEXT resouce (don't remember >>the number). I had thought they had a limit of 32k, not 40k. Anyway, if >>you fill the resource, that's it. Its full. > >That's what Jon said...unlimited. [Actually, he meant effectively >unlimited...the code probably reads the resource in one chunk, not in >pieces (although the Resource Manager has supported doing the latter for >several years).] > >There hasn't been a 32K limit on resource size [imposed by the OS] for >about a decade. Well, whatever. But there is a limit on Perl CGI's of about 40k. And its only because the code is stored in a TEXT resource. So, either we live it and work around it by storing most of the code in a text file and requiring it in, OR we ask Matthias (sp?) to fix it. And I don't really think he can (I read - and hacked - the PCGI glue at one point in time. In fact, my changes are still shipping I believe. But he reads the TEXT resource in one chunk, and there is that 40k or something limit.) The best thing to do is to move out to a text file and have the PCGI glue basically just parse it apart and then run a script. For example, what I do is make a PCGI that contains code to read in stuff (basically the cgi-lib.pl file is in the PCGI app.). Then I just enter place (instead of "real work for it to do) commands like so: require "$in{'FILE'}"; &Main; So that my entire program is read in from a text file and then it starts at the subroutine called Main. Thus I only have to have 1 PCGI running at any time on the server. And I don't have a limit on the code size. And the "shared" code of the cgi-lib is shared across all those scripts. Think of the space/time/ram savings here.... That's your best bet. Shawn. Programmer for IN Jersey: http://www.injersey.com/ ---------------------------------------------------------------------------- --------------- Why do I like Perl? Because "in accordance with Unix tradition Perl gives you enough rope to hang yourself with." - Programming Perl. Why do I dislike Java? Because "the class ROPE that should contain the method HANG to do the hanging with doesn't exist becuase there is too much 'security' built into the language." - Shawn.