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

[MacPerl-WebCGI] CGI/WebSTAR problem



Hello,

I'm fairly new to the Mac, maybe that's why my stuff's not working as
expected. I hope that someone can help me with the following problem:

I've used Perl on Linux to write a webshop, which now needs to be ported to
the Mac. It works as follows: there's a set of database files - one for each
product category. In my HTML layout, a frame on the left contains a list of
all categories. When I select one and click a "Go" button, a script
webshop.cgi is called which gets the ID of the selected category, picks the
right database file, reads it and displays all entries on a pretty HTML
page. It works very well on Linux, and it also partly works on the Mac.

"Partly", because some product categories are not entirely displayed. When I
look at the HTML code returned by webshop.cgi (in Netscape 4.7), I can tell
that the script at some point just stops outputting code. This is true for
"large" database files with more than 90 entries (each of which can be very
long as well!).

5 days of hard testing showed to following results:

1) Running the scripts in MacPerl works fine (using "Run Script webshop.cgi"
and passing parameters from standard input). That's true for both the source
code version and the "real" cgi-program compiled with MacPerl.

2) Whenever the script aborts output, it always does so at the same point

3) When I don't touch the memory assignment for the cgi file (by default 128
KB), I get a "document contained to data" message. When I increase the
memory assigned, I get this incomplete HTML code. However, assigning more
and more memory has no effect on how much output I get.

That's what I've found out. I've mailed those results to Mr. Neeracher, and
he said there was a limit to the amount of data a CGI Script can handle
(32KB or 64KB). I've asked for workarounds and he told me to post my
question here.

I'm using the following code to read the database files:

...
open(DBS, "+<$databaseFile");
@dbs = <DBS>;
close(DBS);

foreach $line (@dbs)
{
  ... output html ...
}
...

My configuration:
iMac DV G3/400
64 MB RAM/128 swap file
MacPerl 5.2.0r4
WebStar 4.2 evaluation
Netscape 4.7-199990909

What can I do? Has anybody experienced similar problems? Are there
workarounds?

Any help very much apprechiated...
Thorsten Dittmar


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