newLISP Fan Club

Forum => newLISP newS => Topic started by: cormullion on December 28, 2008, 01:43:35 AM

Title: upload.cgi
Post by: cormullion on December 28, 2008, 01:43:35 AM
I'm trying to get upload.cgi working on a newLISP 9.3 system. I think that there were some changes to write-buffer between newLISP 9.3 and 10... I've been changing things around but I've got confused... What should I do for 9.3? Eg:


; read data into intermediate file
(set 'infile (open "upload-file" "write"))
(while (!= (read-buffer (device) 'buffer 1024) 0)
   (write-buffer infile buffer))
(close infile)
Title:
Post by: Lutz on December 28, 2008, 09:00:15 AM
Several changes are necessary. Here are 9.3 and 10.0 versions, both tested and working on nfshost:



http://www.newlisp.org/upload/upload-93-cgi.txt

http://www.newlisp.org/upload/upload-10-cgi.txt

http://www.newlisp.org/upload/upload-html.txt



The most important thing to get right is file permissions on nfshost. Put 755 on the cgi file, 777 on the upload directory and change the group ownership of the cgi file and upload directory to: web (the webserver program user).



These permissions are host specific and may be different on other installations.
Title:
Post by: cormullion on December 28, 2008, 09:47:17 AM
Wow, Lutz, that's fantastic! Thanks so much... :)