strange thing with Rev cgi

jbv jbv.silences at
Wed Nov 8 07:26:11 EST 2006

Hi list,

I have a Rev cgi script that builds javascript data (mostly large 2
arrays : typically 200 rows & 500 cols), then replaces some keywords
these js data in a HTML template file before pushing the content to the

Today, I suddenly got a code 500 error when processing very large
of data. I found that the script crashed in the middle of successive
instructions. So I inserted something like that :

    put "myTest.txt" into path
    delete file path
    open file path
    write myVar1 &cr&cr&cr& myVar2 &cr&cr&cr& myVar3 to file path
    close file path

to determine which replace instruction was crashing the script.

And to my great surprise, I discovered that inserting the above lines
prevents the script from crashing !!!!

I thought that may be there was a memory problem, so I tried to put
    put "" into myVar1
right after each replace instruction. But the script continues to choke.

Even stranger : if write only 1 variable to the test file, the script
crashing... I need to write at least 3 variables to prevent it from

Does anyone have a rational explanation for that ?


More information about the Use-livecode mailing list