Error on testing IDE

Started by HPW, May 03, 2004, 10:49:52 PM

Previous topic - Next topic

HPW

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.
Hans-Peter

Lutz

#1
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

HPW

#2
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?
Hans-Peter

Lutz

#3
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

HPW

#4
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)
Hans-Peter

Lutz

#5
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

HPW

#6
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.
Hans-Peter

Lutz

#7
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

Lutz

#8
there Imwould check first if it sets 'file-ame' and 'data-root' correctly. All the (CGI:...) functions are cgi.lsp (version 1.4)



Lutz

HPW

#9
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">http://localhost/index.cgi?author=Test&; ... st+comment">http://localhost/index.cgi?author=Test&comment=Tes+Bla&page-name=FeatureComments&submit=post+comment



answers with:



string expected : (getenv "REMOTE_ADDR")



:-(
Hans-Peter

Lutz

#10
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

Lutz

#11
QUERY_STRING is set in httpd but REMOTE_ADDR is not (and will not)



Lutz

HPW

#12
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.
Hans-Peter

Lutz

#13
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

HPW

#14
>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">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!
Hans-Peter