Page 1 of 1

upload.cgi

Posted: Sun Dec 28, 2008 9:43 am
by 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:

Code: Select all

	; read data into intermediate file
	(set 'infile (open "upload-file" "write"))
	(while (!= (read-buffer (device) 'buffer 1024) 0)
	    (write-buffer infile buffer))
	(close infile)

Posted: Sun Dec 28, 2008 5:00 pm
by Lutz
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.

Posted: Sun Dec 28, 2008 5:47 pm
by cormullion
Wow, Lutz, that's fantastic! Thanks so much... :)