Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - dukester

#16
Both are set.  I've installed newlisp in c:binnewlisp to make sure that I did not have future issues with spaces in directory names like "Program Files" etc. So  NEWLISPDIR  points to c:binnewlisp.



PROGRAMFILES is set to "Program Files".  I changed it to c:binnewlisp.



The change did not fix my problem. BTW what did you do in 2015 to fix this very same issue?  You modified something in newlisp.exe and asked me to try your modifications. One of them worked!!! :-)
#17
@ralph.ronnquist

You bet that I have an Hex editor!!  I don't see any garbage - which puzzles me. I've included a screen capture of the output. Now I'm wondering what Apache is choking on!! Pain in the Pa-toot!! LOL
#18
@lutz Thx, but that does not work either. Sorry!
#19
Nope!  No cigar! LOL
#20
Quote from: "xytroxon"I think the problem is that the command-line prompt and initial copyright banner output needs to be suppressed.



Change the line:
#!C:binnewlispnewlisp.exe

To:
#!C:binnewlispnewlisp.exe -c

Thx!  I'll give that a shot!!
#21
@rickyboy  All good stuff!  But if Apache was being a bad-ass, it would be doing so with my Perl, Python and Ruby scripts!  Even old CLISP scripts run well.  Get where I'm going with this?  ;-)



Thanks for the heads-up regarding Apache security stuff!
#22
@ralph.ronnquist - I'm sure that you are absolutely correct. However, I've never had to do what you are suggesting. Most of my experience has been on Apache using from CL to Perl to crank out CGI stuff.  Newlisp is the only interpreter that has ever given me fits with these type of issues - given that I didn't trash that very important first line of code.



Lutx fixed this issue once. He may not want to deal with it again. I've got the very same script running just fine using CLISP2.49. I don't use -http unless I want to serve an Intranet.



thx for getting back to me.
#23
Quote from: "ralph.ronnquist"You might want to try the initial line Status: 200 OK

Don't know what you mean!
#24
Quote from: "rickyboy"Looks suspiciously like the ole windoze versus unix line ending issue/difference. I'd check that before moving on to anything else.

Nope! It's a newlisp issue - just like back in 2015.



I tried your suggestion, even though I knew it wouldn't work. And it didn't. Lutz will have to get involved I'm sure. Thanks anyway!
#25
PS C:binnewlisp> newlisp -v

newLISP v.10.7.1 64-bit on Windows IPv4/6 UTF-8 libffi.



Running Apache2.4 on a Win10 box.



Apache is choking - once again - on the header sent by newlisp:


QuoteContent-type' contains invalid characters, aborting request


Lutz fixed a similar issue back in 2015, but it seems to have re-surfaced!



This is the code used then and now:
#!C:binnewlispnewlisp.exe
(print "Content-type: text/htmlnn")

(print "<html>")
(print "<h4>CGI by newLISP v" (sys-info -2)" on " ostype "</h4>")
(dolist (e (env)) (println (e 0) " : " (e 1) "</br>"))
(println "</html>")
(exit)


Anybody know how to fix this issue?
#26
Thx Ralph!!  Much obliged ...



I now see how I confused the "break expression" with "sub list" expression!  



Learning any flavour of LISP as been such a challenge for me!  But at my age, the struggle might be an excellent way to keep the "leetle grey cells"  flashing and sparking!  LOL
#27
So how does this reconcile with the code snippet



(dolist (x (2 (main-args)))


that you kindly volunteered in your previous post - which works like a charm?
#28
Thanks for the reply Ron!



The manual says:
Quote
dolist

syntax: (dolist (sym list|array [exp-break]) body)



(dolist (x '(a b c d e f g) (= x 'e))  ; prints]

The optional "exp break" appeared to follow all the other arguments!



How am I interpreting the manual incorrectly?
#29
newLISP in the real world / Re: set - setf - setq woes
August 23, 2017, 05:54:26 PM
@s.v.   Thanks!  I will read your reply carefully and as an exercise, I will fabricate some examples to prove your points.



I have been using (set 'a-symbol blah blah) as an equivalent to (setq a-symbol blah blah).  Maybe that was a bad assumption!



Thx for the input ...
#30
I have this test code:

#!c:binnewlispnewlisp.exe
(println (main-args 2))   ;; works OK

(dolist (x (main-args))
(println $idx ":" x))
(exit)


The above code works fine!  BUT  - when I ask dolist to use a "break expression", I'm making it choke and I don't know why!



So if I do:

(dolist (x (main-args 2))


No joy!!  Help!!  and I have read the manual!!   TIA ....



BTW, this is happening on a Win10 box