liburl cgi linux

Dave Cragg dcragg at lacscentre.co.uk
Wed Feb 8 07:22:54 EST 2006


On 7 Feb 2006, at 23:37, Thomas McCarthy wrote:

>
>> I just did the latter, and I can post from the cgi script on a Linux
> server.
>
> I forgot to ask, how did you test it?

The hard way. :-)  I checked the Apache error log on the server which  
gives the line in the CGI script where the error occurred. In this  
case it was the <start using stack "myliburl.rev"> line. Then, as I  
was responsible for adding the "open secure socket" line to libUrl, I  
had a jump start on guessing the problem. (unfair, I know)


> Do you have an easy way to test that anyone could use?

Afraid not. You can do syntax checking by putting the cgi script in a  
button and making sure it will compile. But that won't catch runtime  
errors like this.

Where possible, I try to build new cgi scripts around old ones that I  
know work. And then build them in stages, testing as I go. A local  
"test server" is useful for this, but not always practical.  Putting   
the script in a try handler can help, with the "catch" element  
returning some useful diagnostic information.

But I'm always on the lookout for simpler solutions.

Cheers
Dave



More information about the use-livecode mailing list