• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF file upload problem on LINUX

Guest
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

314

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

LATEST
Could we see the code on your action page, test2.cfm? It is likely the one causing the problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation