Newlisp-Apache-CGI Issues Again

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
ralph.ronnquist
Posts: 228
Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia

Re: Newlisp-Apache-CGI Issues Again

Post by ralph.ronnquist »

Hey!
dukester wrote:
Response header name 'Environment variable TMP not set, assuming /tmp .Content-Type' contains invalid characters, aborting request
That error message shows that newlisp has an initial "complaint" about "TMP", which means what it says, and that complaint precedes the script output. It has nothing to do with your script.

So the quest should rather be to get rid of that piece of output. That amounts to making sure that TMP is set before newlisp is invoked, or, you get it compiled without that complaint.

dukester
Posts: 115
Joined: Tue May 08, 2007 1:06 pm
Location: Alberta, Canada

Re: Newlisp-Apache-CGI Issues Again

Post by dukester »

I've got TMP/tmp/temp set in so many places that all hell wont have it. BTW I never get this bleeding tmp issue with any other script.
duke

ralph.ronnquist
Posts: 228
Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia

Re: Newlisp-Apache-CGI Issues Again

Post by ralph.ronnquist »

RIght. And yet it's missing for newlisp.

Apparently Apache has "SetEnv" and "PassEnv" directives that possibly would service your use case. Or else, I suppose you can wrap the script with a shell script for this purpose. Or if you like living on the edge, you could apply a binary editor to your newlisp executable and put a \000 at the beginning of the boring output string ;)

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: Newlisp-Apache-CGI Issues Again

Post by rickyboy »

Good catch, Ralph. I read that message wrong (but yet there is the response header name, right there between the two single quotes). Didn’t help that duke’s OP didn’t have the entire message there to begin with. Kinda faked me out. dukester! lol ;)
(λx. x x) (λx. x x)

dukester
Posts: 115
Joined: Tue May 08, 2007 1:06 pm
Location: Alberta, Canada

Re: Newlisp-Apache-CGI Issues Again

Post by dukester »

Problem solved!

I configured Apache to run as a reverse proxy on a sub-directory to my cgi-bin containing newlisp scripts. I run newlisp as -http -d 8080 -w <full\path\to\cgi-bin\newLISP>

In Apache httpd.conf, simply load:
mod_proxy.so
mod_proxy_http.so
mod_proxy_http2.so

and insert the following directive in the same file:

Code: Select all

<Location "/cgi-bin/newLISP/">
      ProxyPass  "http://127.0.0.1:8080/"
</Location>
Cigars and joy all around!!! :-)
duke

Locked