upload.cgi

Notices and updates
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

upload.cgi

Post 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)

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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.

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

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

Locked