newLISP Fan Club

Forum => newLISP in the real world => Topic started by: HPW on May 03, 2004, 10:49:52 PM

Title: Error on testing IDE
Post by: HPW on May 03, 2004, 10:49:52 PM
I get the following error when I try the latest IDE:


Quote
C:newlisp>newlisp httpd 80  ide

Server started listening on port: 80

Root directory: ide

Tue May 04 07:44:30 2004 127.0.0.1 GET / HTTP/1.1

Tue May 04 07:44:30 2004 127.0.0.1 GET /file-frame.cgi?name=data/ HTTP/1.1

Das System kann den angegebenen Pfad nicht finden.



list or string expected in function replace : HTTPD:buffer

called from user defined function execute-file

called from user defined function process-GET-request

called from user defined function process-http-request

called from user defined function net-server-accept

called from user defined function startServer



C:newlisp>


And the browser shows the ide titletext and a framed-window which both shows the error that the page could not be displayed.
Title:
Post by: Lutz on May 04, 2004, 05:19:27 AM
cannot repeat:



C:newlisp>newlisp httpd 80 ide

Server started listening on port: 80

Root directory: ide

Tue May 04 08:16:18 2004 127.0.0.1 GET / HTTP/1.1

Tue May 04 08:16:19 2004 127.0.0.1 GET /file-frame.cgi?name=data/ HTTP/1.1

Tue May 04 08:16:19 2004 127.0.0.1 GET /content-frame.cgi?method=new HTTP/1.1

Tue May 04 08:16:19 2004 127.0.0.1 GET /folder.gif HTTP/1.1

Tue May 04 08:16:19 2004 127.0.0.1 GET /text.gif HTTP/1.1

Tue May 04 08:16:26 2004 127.0.0.1 GET /file-frame.cgi?dir=data/ HTTP/1.1

Tue May 04 08:16:26 2004 127.0.0.1 GET /folder.gif HTTP/1.1

Tue May 04 08:16:26 2004 127.0.0.1 GET /text.gif HTTP/1.1

Tue May 04 08:16:27 2004 127.0.0.1 GET /content-frame.cgi?method=open&name=READM

E&dir=data/ HTTP/1.1



Are you sure you are using the Ide 2.2 and httpd 3.5 ?



Lutz
Title:
Post by: HPW on May 04, 2004, 06:04:01 AM
Quote from: "Lutz"
Are you sure you are using the Ide 2.2 and httpd 3.5 ?

Lutz

Yes using both from fresh download.



What does this mean in README from IDE:



In the file 'httpd' line 140/41 should be changed.



And how must the first line from the CGI-files looks like:

(When newLISP is in C:newlisp under Windows)



Instead of:



#!/usr/bin/newlisp



should it be:



#!/newlisp



Anything other what can be wrong?
Title:
Post by: Lutz on May 04, 2004, 07:32:19 AM
The README file in newlisp-IDE-22.tgz is out of date there, are no changes in httpd 3.5 required. The old 140/141 change was required for Win32 versus Unix. Now the code in line 174 does automatic detection.



Make also sure that the directory where newlisp.exe lisves, is in the Win32 path environment.



Lutz
Title:
Post by: HPW on May 04, 2004, 11:25:55 AM
I managed to get it run at home. But I get a Debug window with this:


Quote
Es ist ein Laufzeitfehler aufgetreten.

Soll der Deug-Modus gestartet werdenß



Zeile: 6

Fehler: 'parent.frames.1.document.forms.0.Directory' ist Null oder kein Objekt


I can not use the New and Evaluate button, because I get a 'No page possible display'.

What should happen when Evaluate is pressed?





Wiki 2.6 runs with no problems.



(WIN XP IE 6.0 2600)
Title:
Post by: Lutz on May 04, 2004, 12:58:20 PM
Reading the German error message, the problem seems to be executing the left frame (I think left frame is 1, right frame is 2), but I just have no luck trying to repeat this problem. I tried with newlisp 8.0.2 IDE 2.2 and httpd 3.5 and IE 6 or Mozilla 1.7 on XP-Home.



The only thing you could do is insert (println ...) statements in the code of file-frame.cgi to see how far it gets. You would see those (println ...) in the file frame.



Lutz
Title:
Post by: HPW on May 04, 2004, 11:39:20 PM
Found one bug!



You have a hardcoded path to tmp inside httpd which does not exist

on my office PC. So then it does not show up here.



But New and Evaluate still bring up the DNS-error sreen.

But I noticed that the action is evaluated because the file c:tmppcgi is written by the evaluated lisp-sorce.
Title:
Post by: Lutz on May 05, 2004, 04:59:29 AM
I will put the requirement for the 'tmp' directory into header of httpd.



"But New and Evaluate still bring up the DNS-error sreen. "



Tha would be in the file content-fram.cgi:



(if (= (CGI:get "method") "open")

    (begin

        (set 'file-name (CGI:get "name"))

        (set 'data-root (CGI:get "dir"))

        (CGI:put-page "editor-frame.html")

        (exit)))



and



(if (CGI:get "EvalSubmit")

    (begin

        (set 'source-txt (CGI:get "Source"))

        (print (eval-string source-txt))

        (print "
<hr width="50%">")))



Lutz
Title:
Post by: Lutz on May 05, 2004, 05:06:38 AM
there Imwould check first if it sets 'file-ame' and 'data-root' correctly. All the (CGI:...) functions are cgi.lsp (version 1.4)



Lutz
Title:
Post by: HPW on May 05, 2004, 07:19:46 AM
Still no success.



I saw some '(getenv "QUERY_STRING")' but no 'setenv' elsewhere.

Can it be something with this?





And now I test wicki:



http://localhost/index.cgi?author=Test&comment=Tes+Bla&page-name=FeatureComments&submit=post+comment



answers with:



string expected : (getenv "REMOTE_ADDR")



:-(
Title:
Post by: Lutz on May 05, 2004, 09:48:13 AM
The README file mentions that the wiki runs only on Apache or similar webservers (which supply the adequate environment  variables)



What this statement does, is supply an IP signature to every comment  post. You might be able to run if just just take it out.



Lutz
Title:
Post by: Lutz on May 05, 2004, 09:51:32 AM
QUERY_STRING is set in httpd but REMOTE_ADDR is not (and will not)



Lutz
Title:
Post by: HPW on July 11, 2004, 12:28:26 AM
I revisited my problem with the new IDE 3.0



On startup of IE/localhost I still get a error window:



Fehler: 'parent.frames[1].document.forms[0].Directory' ist Null oder kein Objekt



Starting the IE-debugger marks the line:



parent.frames[1].document.forms[0].Directory.value='data/';



Then it works on most actions.



But when I move to the win32-command and click exec, it show the directory, but when I use then the folder-up symbol I get the same error window. Without the exec it works correctly.
Title:
Post by: Lutz on July 11, 2004, 07:27:03 AM
Cannot reproduce this. Perhaps you can give me the exact procedure where and how you start httpd, where newlisp.exe resides, the path, directory structure involved etc..



Also, do you have that bottom link in the left frame which says "C:Documents and SettingsHans Peter" ? And can you move up and down into the directory structure, specifically data/ in ide, from there?



The bug fix for HTTPD 3.6 post on IE introduced a problem with exec. Perhaps the data/ path and exec problem are related, we will see.



Lutz
Title:
Post by: HPW on July 11, 2004, 09:43:16 AM
>Cannot reproduce this. Perhaps you can give me the exact procedure where and how you start

>httpd, where newlisp.exe resides, the path, directory structure involved etc..



newlisp in c:newlisp



C:newlispide

C:newlispidedata



command window opened in c:newlisp



Start with: newlisp httpd 80 ide



Response in command-window:

Server started listening on port: 80

Root directory: ide



Open IE and choose http://localhost



Then the error window appear, but then it works correctly.



>Also, do you have that bottom link in the left frame which says "C:Documents and SettingsHans Peter"



Yes, I can click on it and navigate from there back to the newlisp dir.



 ? And can you move up and down into the directory structure, specifically data/ in ide, from there?



Yes, no problem. I can go down and up and use 'home' and 'refresh'.

Also I can use 'cd' to navigate to root etc.



>The bug fix for HTTPD 3.6 post on IE introduced a problem with exec. Perhaps the data/ path and exec problem are related, we will see.



When I use the win-shell command once I can no more navigate without the error.



PS: WIKI runs nice now with newlisp HTTPD! Great!
Title:
Post by: Lutz on July 12, 2004, 06:09:00 AM
Thanks for the detailed info. You start up httpd exactly the same way on Windows as I always do. But I think this is the statement in ide/file-frame.cgi where your IE is choking on:



(println {<SCRIPT LANGUAGE="JavaScript">})

(println {parent.frames[1].document.forms[0].Directory.value='} data-root {';})

(println {</SCRIPT>})



For some reasons it works fine on my IE v 6.0 but not on yours, must be some configuration issue of IE? I have one other (older Win2k) computer with I.E 5.0, which I can try this afternoon.



I found another fix for the IE/Mozilla incompatibilities formatting POST requests. The latest httpd-3-7 in http://newlisp.org/download takes care of this. Since httpd 3.0 I had only tested httpd on Mozilla thinking is wouldn't matter on a server, now I know better. IE and older Netscape send an extra CR-LF after POST requests even when the "content-length:" field is specified in the header not including these 2 extra bytes. This makes 2 additional bytes to drain from the socket.



Lutz
Title:
Post by: HPW on July 12, 2004, 08:05:48 AM
I just test on my 2 office PC with WIN/XP and WIN/2K.

Both work fine now with 3.7. No error's and stable. Great!



2 Observations:



mandelbrot-short.lsp always produce black squares.

mandelbrot.lsp makes a nice colord one.



The navigation frame with the files is case-sensitive.

So folder with lowercase name like 'newlisp' get down the list.

Is this configurable?



Will test at home in the evening.
Title:
Post by: Lutz on July 12, 2004, 09:26:26 AM
mandelbrot-short.lsp will be deleted in next version, I was trying the modern

color coding with three hex character, as used in CSS stylesheets, in a table.



About sorting the filenames: its just doing the default ASCII sorting, too much trouble to give this special treatment  on Windows (too busywith other stuff). On LINUX/Unix filenames are case sensitive, on Windows not, this is why it mixes upper and lower case  in a WindosXP listing but sorts in ide.



Lutz
Title:
Post by: HPW on July 12, 2004, 09:31:00 AM
Just tested it at home.



But here no success. Still getting the same error.



Strange.



IE 6.0.2600 on german XP Pro (all patches)



Is it correct that the pcgi file in tmp has '0D0D0A' at the

end of each line insted of '0D0A'.
Title:
Post by: Lutz on July 12, 2004, 09:34:59 AM
thats correct, its an artifact of the piping process, these get filtered/replaced before sending to the browser (see line 188 in httpd).



Lutz
Title:
Post by: HPW on July 13, 2004, 12:56:34 AM
I had reported that IDE works on my 2 office PC. I just try to check out the difference between my home PC and the PC here. So I found out that the error happens also here, but it is not displayed, because I disabled the option 'Show script error' in the IE extended options. So they only show up in the status bar in the left bottom corner.