PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

File Upload Error: FAILED(Temporary File could not be copied.)

  1. I have both check with my host to assure that we have the correct permissions of 755 and made sure that PHP Safe mode is OFF, and yet the file uploader is STILL not working.

    I have all appropriate logins and the chat log from the tech support

    (5:19 pm) Chase: Which was I was told a Server limitation
    (5:20 pm) Chase: From their support "I would suggest double checking the file permissions on the wp-content/uploads/gravity_forms folder and make sure it and all sub-folders have CHMOD 777 and test again."
    (5:20 pm) Chase: but the folder is now "gravityforms"
    (5:21 pm) Caleb L. I can set the permissions up for you now if you would like.
    (5:22 pm) Chase: yes please
    (5:22 pm) Caleb L. Okay one moment please.
    (5:22 pm) Caleb L. Before we proceed I would only need to verify you as the account owner at this time. May I have the last four digits of the credit card on this account please, or Pay Pal transaction ID please? This is only for verification purposes. I can send a verification email to the primary email on this account now if needed as well. You would only need to respond to this email.
    (5:23 pm) Chase: XXXX
    (5:24 pm) Caleb L. Thank you.
    (5:24 pm) Caleb L. Okay please try now.
    (5:25 pm) Chase: Still no luck
    (5:26 pm) Chase: if the permissions are set then I guess I have to take it up with plugin support yes?
    (5:26 pm) Caleb L. Unfortunately you would need to do this Chase. I am sorry.
    (5:26 pm) Chase: No worries
    (5:27 pm) Chase: story of my life with this site.
    (5:27 pm) Chase: thanks!
    (5:27 pm) Caleb L. You're welcome! Is there anything else I can help you with today?
    (5:28 pm) Chase: I'm sorry
    (5:28 pm) Chase: but can we double check
    (5:28 pm) Chase: 100% sure
    (5:28 pm) Chase: that that plugin has all the permissions it could possibly need
    (5:28 pm) Chase: to write
    (5:28 pm) Chase: From their support "The path is your wp-content/uploads folder. Gravity Forms then creates a gravity_forms folder there where it stored any files that are uploaded and creates additional subdirectories.

    Just FYI, web hosting is all about which support person you get. We had issues with our own host where we were told file permissions were set properly when really they were not. We didn't learn this until we discussed it with another support person who realized file permissions appeared to be correct, but not for the user account that the PHP was executing as. So never rule that out. "
    (5:29 pm) Caleb L. Chase i can tell you that we do not allow permissions to be set to 777, but we do allow 755 which should give the proper access.
    (5:29 pm) Caleb L. That may be the issue that the plugins does not work with 755 permissions.
    (5:29 pm) Chase: Why don't we allow 777?
    (5:30 pm) Caleb L. I have more information on this topic here:

    http://support.hostgator.com/articles/cpanel/how-to-change-permissions-chmod-of-a-file

    (5:30 pm) Caleb L. The concern is giving writable permissions to Group and World. This allows hackers from the world wide web to edit your files. Thus, the last two digits of file permissions should never be 2, 3, 6, or 7.
    (5:30 pm) Chase: also "There can be security restrictions on the user that runs WordPress or the web server, or ownership problems. "
    (5:32 pm) Chase: Apparently that error message is strictly server side
    (5:32 pm) Chase: so it's gotta be something wrong with the server
    (5:34 pm) Caleb L. I apologize there is no server error at this time. It would seem that this plugin requires file permissions that we unfortunately do not allow. I can recommend contacting the plugin support to inquire as to why the plugin doe snot work with 755 permissions though.
    (5:34 pm) Chase: Alright can I have a log of this tech support emailed to chase@gatorworks.net
    (5:36 pm) Chase: and is PHP safe mode on?
    (5:36 pm) Caleb L. Yes of course! Once this chat is closed there will be an email to me option available for you.
    (5:36 pm) Chase: ok
    (5:36 pm) Chase: So PHP Safe Mode?
    (5:37 pm) Caleb L. I will check that for you now . One moment please.
    (5:41 pm) Caleb L. This would be off I can turn it on for you if needed.
    (5:42 pm) Chase: i don't think that will help
    (5:42 pm) Chase: will it?
    (5:42 pm) Chase: If you have PHP Safe Mode turned ON on your web server, this could prevent it from being able to write/create folders and files to your server.
    (5:42 pm) Caleb L. Unfortunately that would not help as it is already off.
    (5:43 pm) Chase: Ok
    (5:43 pm) Chase: To the support forums then
    (5:43 pm) Chase: Thanks for your help Caleb
    (5:43 pm) System Chat closed by customer request.

    Site link : Test Form

    Posted 12 years ago on Tuesday November 29, 2011 | Permalink
  2. It is going to be server related. We'd be glad to assist you with this and debug what is going on.

    However, in order to do so we will have to debug the issue directly on your server because it has to be debugged where it is happening.

    We will need the following information:

    - WordPress URL to your site
    - WordPress admin login to your site
    - FTP login for your site

    You can send this information to me directly at carl@rocketgenius.com and I can have a member of our team investigate and debug the issue to determine what the problem is.

    However, we won't be able to debug this until tomorrow as it is currently after hours. But if you get the information to me ASAP we can get to it as soon as we can tomorrow.

    Posted 12 years ago on Wednesday November 30, 2011 | Permalink
  3. Sent all the pertinent info.

    Posted 12 years ago on Wednesday November 30, 2011 | Permalink
  4. I have emailed all the pertinent info and haven't heard anything back for a while now. Any news?

    Posted 12 years ago on Thursday December 1, 2011 | Permalink
  5. You mentioned the folder is not gravity_forms any more but is gravityforms. How did you change that?

    Also, have you made any changes to your media settings, setting an upload path and URL?

    Do you have access to server logs to see why this might be failing?

    Can you create a simple form with just a file upload field and maybe one other field, then upload a small file? Try and image or text file. Try from the preview and not the front end of the site.

    This is something specific to your server, as it is not a commonly reported problem. I had a problem in the past with uploads not working, and requiring very loose permissions, but it was because the files and folders were owned by the wrong user, not the user that is running WordPress, in most cases apache or nobody. The ownership of the wp-content/uploads/gravity_forms/ directory was incorrect.

    There are a lot of things you can check. Please provide answers to some of these questions as soon as it's possible. Thank you.

    Posted 12 years ago on Friday December 2, 2011 | Permalink
  6. I was incorrect about the folder, i was referring to the plugin folder, not where it writes.

    Nope, haven't made any changes to media settings. Where would I find server logs? Is this something I need to contact my hosting for?

    I tried a simple form. I also tried from both preview and live, neither worked. Hope this helps. I will try to hunt down logs while you read this.

    Posted 12 years ago on Friday December 2, 2011 | Permalink
  7. Honestly, I'm not sure why I haven't received more help. I emailed literally every login I have, cpanel, ftp, wordpress, and i'm just getting the run around still. It's pretty important I get this working. Especially considering my hosting continuously tells me it's NOT a server error.

    Posted 12 years ago on Friday December 2, 2011 | Permalink
  8. From hostgator support :

    (10:42:34am)Elizabeth M.Okay it does upload and you can see it in the page. When you go to click on the preview option it goes to http://www.coastalmasterplan.louisiana.gov/wp-content/plugins/gravityforms/preview.php?id=1
    (10:42:42am)Elizabeth M.Which lets me know it is for sure a plug in issue.
    (10:43:19am)Chase Swindlerso what do I need to tell their support
    (10:43:26am)Chase Swindlerin order for them to quickly diagnose the issue
    (10:43:31am)Chase Swindlerb/c they keep telling me server issue
    (10:44:00am)Elizabeth M.I would give them that URL. Let them know you can upload a test file through the form and it works. You know this because you can go to Entries and see it there. However when you click on "preview" it takes you to a bad URL.
    (10:44:04am)Elizabeth M.Adn then give them that URL.
    (10:46:13am)Elizabeth M.I would also have them do exactly what I did. Do it from start to finish so they can see the actual issue. Let them know all the permissions and ownerships are just fine as well.

    Also worth noting: It works when I try to upload a jpg, but a PDF breaks it. Specifically a PDF that is 6mb.

    Posted 12 years ago on Friday December 2, 2011 | Permalink
  9. @gatorworks You didn't receive a response from me because your email containing the login information was flagged as spam by gmail and sent to my spam folder. I have unflagged it and was able to login to your site.

    HostGator is actually incorrect. This URL exists:

    http://www.coastalmasterplan.louisiana.gov/wp-content/plugins/gravityforms/preview.php?id=1

    If you FTP into your site and browse to wp-content/plugins/gravityforms you will see that the preview.php file indeed does exist.

    When the preview returns a 404 error it is typically a server related issue. Usually it's related to permissions or permalink rewriting problems and that is exactly what the situation was here.

    I changed the file permissions on the Gravity Forms plugin folder via FTP on your site from CHMOD 777 to CHMOD 755 and now the preview is working as intended and does not return a 404 error.

    I then submitted this form as a test via the preview and uploaded a 775KB image file. It uploaded without a problem. You can view the entry here:

    http://www.coastalmasterplan.louisiana.gov/wp-admin/admin.php?page=gf_entries&view=entry&id=1&lid=10&paged=1

    I then submitted this form as a test via the preview and uploaded a 2.5MB image file. It failed. The temporary file could not be copied, which me the issue is likely going to be related to file size.

    I then inspected your PHP settings and your site has a PHP max upload setting of 2 MB in it's PHP settings. This means it won't allow uploads of 2 MB or greater to be uploaded via PHP. This is why my 2.5MB file upload failed and why your 6MB PDF upload failed.

    So as with the preview returning a 404, your file upload issues are also related to HostGator server settings. I corrected the preview issue as explained above. However, you will need to discuss your PHP max file upload settings with your host. Although given the interaction you included above with HostGator I don't have great confidence in their ability to assist you considering the issues were indeed server related to begin with.

    Posted 12 years ago on Friday December 2, 2011 | Permalink