upload.cgi

Started by cormullion, December 28, 2008, 01:43:35 AM

Previous topic - Next topic

cormullion

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)

Lutz

#1
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-93-cgi.txt

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

http://www.newlisp.org/upload/upload-html.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.

cormullion

#2
Wow, Lutz, that's fantastic! Thanks so much... :)