<div>CGI ought to be the simplest protocol ever, you should get this running fast. Check:</div><div><br></div> * Try to run your app individually as to doublecheck that it outputs the right thing (=right function)<div> * Try another CGI app as to doublecheck your app outputs the same thing as the other app (=ensure sufficient protocol conformance for this one)</div>
<div> * Check so that you output the right type of newline expected by the caller and output by the test app, check with a hex editor - \n only or \r\n ? (=")</div><div><div> * Insert a force-output call somewhere maybe</div>
<div> * Make it log its executions to some file so you know it actually got run and how far<br><br></div><div>When it spins, let the ml know how you got it there</div><div><br><div class="gmail_quote">2011/12/13 Eduardo Costa <span dir="ltr"><<a href="mailto:edu500ac@yahoo.com">edu500ac@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><font face="arial">I need to use Scheme or Common Lisp for writing CGI scripts to process the XSL/XML protocols of a law firm. I started with Stalin, since it is easier to compile. The resulting exec files work perfectly well, and have small foot prints. However, the Stalin community does not seem to be very active. Besides this, Stalin is very slow to compile, and does not provide an interpreter. Therefore, I decided to switch to Gambit, Bigloo or SBCL. </font><div style="font-family:arial;font-size:10pt">
<br></div><div style="font-family:arial;font-size:10pt">Gambit has the advantage of providing native infix notation. However, it is not working in most commercial servers that the law firm uses. I am using the following command line to create the exec files:</div>
<div style="font-family:arial;font-size:10pt"><br></div><div style="font-family:arial;font-size:10pt">$ ./gsc -exe gambtest.scm</div><div style="font-family:arial;font-size:10pt"><br></div><div style="font-family:arial;font-size:10pt">
Where gambtest.scm contains the following lines:</div><div style="font-family:arial;font-size:10pt"><br></div><div><div><font face="arial">(display "Content-type: text/html")</font></div><div><font face="arial">(newline)</font></div>
<div><font face="arial">(newline)</font></div><div><font face="arial">(display </font></div><div><font face="arial">"<html></font></div><div><font face="arial"> <body></font></div><div><font face="arial"> <h1>Hello from
Gambit</h1></font></div><div><font face="arial"> </body></font></div><div><font face="arial"></html>" )</font></div><div><font face="arial">(newline)</font></div><div style="font-family:arial;font-size:10pt">
<br></div></div><div><div><span style="font-family:arial;font-size:13px">It generates an executable file that works perfectly well in my machine, but not in the servers that host the pages of the law firm. </span></div></div>
<div style="font-family:arial;font-size:10pt"><br></div><div><div><font face="arial">$ ./gambtest </font></div><div><font face="arial">Content-type: text/html</font></div><div><font face="arial"><br></font></div><div><font face="arial"><html></font></div>
<div><font face="arial"> <body></font></div><div><font face="arial"> <h1>Hello from Gambit</h1></font></div><div><font face="arial"> </body></font></div><div><font face="arial"></html></font></div>
<div style="font-family:arial;font-size:10pt"><br></div></div><div style="font-family:arial;font-size:10pt">For reasons that I cannot fathom, the law firm uses many hosting providers. I also tried to use Gambit as a scripting language. The result is the same. In the case of Bigloo, the problem lies in the fact that it uses dynamic libraries incompatible with the server. I cannot understand why this happens, since Stalin works even when linked to dynamic libraries. By the way, I prefer the scripting
solution, since the static exec files are very large.</div><div style="font-family:arial;font-size:10pt"><br></div><div style="font-family:arial;font-size:10pt">I installed gambit in the hosting provider, making sure that both gsi and gsi-script have permission to execute. I also tested the scripts with Dorai Sitaram's Scheme in Common Lisp to make sure that everything is working fine. Here is the script (that works in my machine):</div>
<div style="font-family:arial;font-size:10pt"><br></div><div><div><font face="arial">#! ./gsi-script -:d-</font></div><div><font face="arial"><br></font></div><div><font face="arial">(display "Content-type: text/html")</font></div>
<div><font face="arial">(newline)</font></div><div><font face="arial">(newline)</font></div><div><font face="arial">(display </font></div><div><font face="arial">"<html></font></div><div><font face="arial"> <body></font></div>
<div><font face="arial"> <h1>Hello from Gambit</h1></font></div><div><font face="arial"> </body></font></div><div><font face="arial"></html>" )</font></div><div><font face="arial">(newline)</font></div>
</div><div style="font-family:arial;font-size:10pt"><br></div><div style="font-family:arial;font-size:10pt"><br></div><div style="font-family:arial;font-size:10pt">Here is the message that I get from Hostgator both for the scripting version and the compiled version:</div>
<div style="font-family:arial;font-size:10pt"><br></div><div style="font-family:arial;font-size:10pt"><h1 style="font-family:'Times New Roman'">Internal Server Error</h1><p style="font-family:'Times New Roman';font-size:medium">
The server encountered an internal error or misconfiguration and was unable to complete your request.</p><p style="font-family:'Times New Roman';font-size:medium">Please contact the server administrator, <a href="mailto:webmaster@advogadosmg.org" target="_blank">webmaster@advogadosmg.org</a> and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p>
<p style="font-family:'Times New Roman';font-size:medium">More information about this error may be available in the server error log.</p><p style="font-family:'Times New Roman';font-size:medium">Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr style="font-family:'Times New Roman';font-size:medium"><address>Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 mod_fcgid/2.3.6 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 Server at <a href="http://advogadosmg.org" target="_blank">advogadosmg.org</a> Port 80</address><address style="font-family:'Times New Roman';font-size:medium"><br>
</address><address style="font-family:'Times New Roman';font-size:medium"><br></address></div></td></tr></tbody></table><br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div></div>