CGI Upload Problem

Hi All

Im trying to convert my perl knowledge to ruby but have a problem trying to
create a CGI upload script.

The apache logs files contain the following :

cannot generate tempfile `/tmp/CGI-3474997.10

This must be a ruby internal, as it obviously has something to do with the
path construct (ie /)
on Win32( sorry, but in the corporate world they still wont let you use
linux :frowning: )

Any ideas, I have thought of using a javascript function to translate the /
char to a \ for windows compatability, but then it means that my UI has to
handle language specifics

Cheers

Graeme Matthew
Analyst Programmer
Mercer Investment Consulting
Level 29, 101 Collins Street, Melbourne, VIC, 3001, Australia
Tel - 61 3 9245 5352 Fax - 61 3 9245 5330
visit http://www.merceric.com

···

__


This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail.

Thank you for your cooperation.


ec03/04

“Matthew, Graeme” wrote:

cannot generate tempfile `/tmp/CGI-3474997.10

This must be a ruby internal, as it obviously has something to do with the
path construct (ie /)
on Win32( sorry, but in the corporate world they still wont let you use
linux :frowning: )

Any ideas, I have thought of using a javascript function to translate the /
char to a \ for windows compatability, but then it means that my UI has to
handle language specifics

IIRC, this shouldn’t be necessary, as the underlying system in Windows
accepts both / and \ in paths. (Atleast I got pounced on severely when I
screwed this up in a ng a few years back.)

The problem should rather be: is there a tmp folder on the root of the
drive that is current to the process running the webserver? Does the
webserver process have the right to write to it? And can you be sure
that this doesn’t suddenly change? (I don’t know if Apache "cd"s around
like a madman).

As for how JavaScript could solve this problem, I do not understand. JS
is completely clientside, so I don’t see how it could help you.

HTH

···

–
([ Kent Dahl ]/)_ ~ [ http://www.stud.ntnu.no/~kentda/ ]/~
))_student
/(( _d L b_/ NTNU - graduate engineering - 5. year )
( __Ă”|Ă”// ) )Industrial economics and technological management(
_
/ö____/ (_engineering.discipline=Computer::Technology)