Upload with apache

Powermaster

Site Supporter
I am loking for a way to upload file from the web to my computer thru Apache.

Dose anyone know a way of doing this? I can only go transfer from web to My Mac.

Any ideas?

Thanks!
 
here is a simple perl script that will do the trick. NOt much security built in so you may want to protect it with a .htaccess
 

Attachments

  • upload_lite.zip
    7.6 KB · Views: 5
I am getting an internal Server error. I have set all the settings to what I belive is correct in the script. Apache error log says premature ending of script headers.

Also says that the file upload.cgi is not found in CGI-EXECUTABLES so it can not be executed. The file is in my correct folder CGI-EXECUTABLES.

Do you have another script or a way to fix this one?

Thanks for you help.
 
Originally posted by ksv
Wouldn't it be easier to try find an ftp upload script? :)

Umm no. I need to upload from school to home. School dose not allow FTP or anyother kind of file transfer. HTTP remains open.
 
did you "chmod +x upload.cgi"?

i will have a look at the script now and see if i can find the problem
 
mine worked straight up. Just changed thes essentials in the script (like upload location etc) and the demo.html file to point to the local cgi script.

Did you accidentially remove a ' or a " when changing the script?
 
I am sure. This is weird.

Error below:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, XXX@powermaster.cc and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.




Apache/1.3.27 Server at www.Powermaster.cc Port 80

Error Log Says:

[Thu May 8 17:46:47 2003] [error] (2)No such file or directory: exec of /Library/WebServer/CGI-Executables/upload.cgi failed
[Thu May 8 17:46:47 2003] [error] [client 192.168.1.1] Premature end of script headers: /Library/WebServer/CGI-Executables/upload.cgi
 
try opening it with project builder then go to format>line endings> Use Unix Line endings (LF)

then resave and try again.

It may be the perl script has windows line endings (CR/LF) which means it wont run on unix because it cant tell where the lines end!

I would almost put money on it - this is the fix

FYI
CR = Carriage return
LF = Line Feed
 
Back
Top