Skip to main content
February 23, 2007
Question

CF file upload problem on LINUX

  • February 23, 2007
  • 3 replies
  • 401 views
The code below is a simple file called test.cfm.

<FORM action="test.cfm" enctype="multipart/form-data" method="post">
What files are you sending? <INPUT type="file" name="files">
<INPUT type="submit" value="Send">
</FORM>

My problem is that my CF server is MX 7.0 running on LINUX with apache. When I submit the form I get a server 500 error but sometimes I get a directory not found error. I think I have narrowed it down to the two file systems(linux vs windows) not talking to each other right. I am on a PC using IE7 or Firefox 1.5.0.9. Neither one works. I talked to another group and they say they use a CF server running on Windows for file transfers only and then use the linux version to run everything else. Although that may work, it seems like a stupid way to do it.

Has anyone else figured out how to get this done. I can't be the only one having this problem.

Thanks
Dave
This topic has been closed for replies.

3 replies

BKBK
Community Expert
Community Expert
February 24, 2007
Could we see the code on your action page, test2.cfm? It is likely the one causing the problem.
February 23, 2007
It's not a permissions issue. I can't even get to that point. The problem is using the code in a file named test.cfm:

<FORM action="test2.cfm" enctype="multipart/form-data" method="post">
What files are you sending? <INPUT type="file" name="files">
<INPUT type="submit" value="Send">
</FORM>

If I choose a file from my PC for the file input and then click the send button I get the server 500 error. The test2.cfm file does nothing except show the debug output and some text saying "hello." This is not getting displayed. It works fine if I put the above code in a file called test.htm and put test2.htm in the action of the form. It submits fine. It's when you submit it with a .cfm extension is when it does not work.

Dave
February 24, 2007
I just tested this on my linux server. I ran the template with IE6 on winXP. No problem.

The file is uploaded initially to CFMX's temp directory - /opt/coldfusionmx7/runtime/servers/coldfusion/SERVER-INF/temp. The CFUser should be able to write to that directory. There should be no issue with different filesystems.

What happens if you try the same thing with your template as an html file?
Inspiring
February 23, 2007
Do you have the correct path to the folder you are trying to upload to on the Linux box? Do you also have the correct ownership/permissions set on that folder? Do you have this mode="644" in your cffile tag? What does your action code look like?