3

I'm using the plugin from here: http://www.uploadify.com/

I have setup a simple test case, select a file etc & I get a "HTTP Error" when I try to upload.

Here is the relevant code from my header..

<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript" src="js/jquery.uploadify.v2.1.0.min.js"></script> 
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/admin.css" rel="stylesheet" type="text/css">

<script type="text/javascript">
$(document).ready(function() {
    $('#sampleFile').uploadify({
        'uploader': 'include/uploadify/uploadify.swf',
        'script': 'upload_test.php',
        'folder': '/work/avais/bizlists/lists',
        'cancelImg': 'include/uploadify/cancel.png'
    });
});
</script>

</head>

.. and here is my html code..

<div id="upload_wrapper">
    <input type="text" name="full_name" /><br />
    <input id="sampleFile" name="sampleFile" type="file" />
    <input type="button" name="upload" value="Upload" onclick="javascript:$('#sampleFile').uploadifyUpload();" />
</div>

I would provide the link but it's inside an admin area.

I couldn't find any documentation on troubleshooting errors on this plugin.

Edit: I checked it with fiddler & it seems I'm getting a "Response Code 413 - Request Entity Too Large" error.

Edit: Problem fixed.... it was an issue with some stuff I had in the .htaccess file, probably the "LimitRequestBody".

5
  • which http error? You can use a http reader like fiddler to validate debug your requests. Commented Oct 27, 2010 at 15:29
  • ok thanks. I'm not sure which http error.... all it says is "HTTP Error" when I click the upload button. Commented Oct 27, 2010 at 15:43
  • OK I checked it with fiddler & it seems I'm getting a "Response Code 413 - Request Entity Too Large" error. Commented Oct 27, 2010 at 16:18
  • Problem fixed.... it was an issue with some stuff I had in the .htaccess file, probably the "LimitRequestBody". Commented Oct 27, 2010 at 17:11
  • @Brett you can answer your own question (your solution is good info) and close it after 24 hours. Commented Oct 27, 2010 at 17:12

2 Answers 2

3

I got a different http error: HTTP undefined or HTTP 500. After 4 hours of searching the web, I found the answer.

It is because the server uses Mod_Security. To turn it off, add these lines to .htacess file

<Ifmodule mod_php5.c>
SecFilterEngine "off"
SecFilterScanPOST "off"
</Ifmodule>

Credit: scaturan posted on http://gallery.menalto.com/node/94614

Sign up to request clarification or add additional context in comments.

Comments

1

Problem fixed.... it was an issue with some stuff I had in the .htaccess file, probably the "LimitRequestBody".

Not sure why these settings affected it as the values I had set in there were larger values than the files I was trying to upload, but alas the code I took out of .htaccess was the below..

php_value upload_max_filesize 256MB
php_value post_max_size 300MB
php_value max_input_time 500
LimitRequestBody 500MB

7 Comments

I get 500 - Internal Server Error, why?
Perhaps user588725's answer will help you!?
Unfortunately, I did try this but the problem still exists with large files.
@AlaaSadik I suggest creating a new question with more details; probably your best chance to solve your issue rather than go back and forth in the comments here; especially since it was a different error than I was getting.
The correct syntax is LimitRequestBody bytes, such as LimitRequestBody 102400 specifying the number of bytes with no metric unit. Otherwise, you'll receive a 500 Internal Server Error.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.