Search This Blog

Monday, October 19, 2009

"Failed To Find Flength File": Uber-Uploader Error SOLVED


"Failed to find flength file."

I moved a new application we're developing from the development server onto the one that we hope to release live soon. As part of this package, we make use of Uber-Uploader and experienced no problems with the dev server, which was set up identically to the soon-to-be-live configuration. However, I kept getting a "Failed to find flength file" error on the new server.

I first consulted the page from Uber Uploader entitled Flength File Help "Failed To Find Flength File." That was clearly not the problem—I did not even have the mod_security module for Apache configured. I then ended up in a discussion forum related to the XUpload solution. Still no joy, though looking back, some people may have been on the right track, just not able to clearly communicate the solution.

In short, it was a file permissions issue. As most of you reading these words probably know, Linux has file permission settings and your Perl/CGI uploader script needs to chmod-ed to 755 or similar—it needs to be fully executable, in other words. No doubt the same issue would be true of an MS server with permissions set as well.

Don't know how to set script permissions? Most FTP programs offer that functionality, including the open-source program FileZilla—right click the Perl upload file, as shown below, and set your permissions to fully executable:

14 comments:

  1. Thank you very much. I lost almost one day to solve the problem. It was very helpfull.

    ReplyDelete
  2. Comments like yours motivate me to keep writing this blog, friend. Thanks. :)

    ReplyDelete
  3. thanks a lot !!! This is the correct answer which I have not found in any other websites

    ReplyDelete
  4. Anonymous5:40 PM

    not hellping. still same error

    ReplyDelete
  5. Hi Nikola. I don't guarantee that I can help you even now, but I've got three ideas for you try.

    First, have you tried the mod_security solution linked in the second paragraph?

    If that didn't help, could it be a permissions issue on the directory itself so that it does not allow for reading and writing to files (in this case, the temporary flength file)?

    Finally, could it be a directory path issue? If you've got your scripts parked in a different place than the configuration file is set up to look for them, that would certainly do it.

    The point is, your file is either not being found where is it supposed to be found or else it is not readable/writable. That could be the fault of many things, but the three above might help at least.

    ReplyDelete
  6. got my hopes up.
    i tried it all. changing the .htaccess file, setting folder and file permissions and making sure the path is set correctly.

    but i've only been at it for about a day now. i guess anything less than a week is ok.

    well, if you guys got any more ideas then please send me wandering out of this dead end.

    thank you for your work.

    ReplyDelete
  7. What kind of hosting environment are you on?

    ReplyDelete
  8. I don't think the documentation is very clear. Are the paths relative to the webroot or to the server root? /tmp/ is certainly from the root of the server What about /cgi-bin/ on my server that is a sibling of my httpdocs directory. I've spent two days on this now. I had it working on one domain. My flength error was caused because the ubr_upload.pl was in the wrong place. Why it didn't say something like "cannot find UBR_UPLOAD.PL" I don't know. The install that was working is no longer working. On a different domain it took be several hours to realize "the cannot create temp folder" error was a php safe mode problem :(

    ReplyDelete
  9. You're asking about how to set up the Uber Uploader scripts? If that's what you're asking, I believe the typical installation is to park your ubr_upload.pl file on the same level as the upload directory (that is, the script lives in the same directory that houses the upload directory where the PHP files are stored: file and directory as twins).

    Keep in mind that my installation has been highly customized and mainly for that reason, I never upgraded to the newer versions, so I make no guarantees this information is still accurate.

    If that is not the question you were asking, do you mind clarifying? I wasn't certain if you referring to this post or to the Uber-Uploader script (which I'm only a user of, like you, not its developer).

    ReplyDelete
  10. To follow up, you mentioned the /tmp directory: mine is located inside my upload directory.

    These are all at the same level, in other words:

    /uber_upload.pl
    /upload
    /upload/tmp

    ReplyDelete
  11. Unfortunatley I am getting the error still after setting these permissions :(

    ReplyDelete
  12. This issue most often pops up when a wireless network interferes with your phone’s connection to Uber..
    ----------------
    Jagadeesh Kumar

    ReplyDelete
  13. Everyone should think more while reading these articles.
    Claire

    ReplyDelete