2044 Unhandled _:.

Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.

I ran across this error when trying to use Flex to upload a file to the server. The problem is that the File is not there. Update: This error occurs when you specify a wrong path to the server-side upload script, not to a file itself. Specifying the correct URL to the server side upload script solved the problem. It is closely related to this error.

// incorrect url (no file named upload1.php)
request = new URLRequest("http://www.somesite.com/upload1.php")
// correct url
request = new URLRequest("http://www.somesite.com/file_upload.php")

try {
	// upload file
	fileRef.upload(request);
	textarea1.text = "uploading " + fileRef.name + "...";
}
catch (error:Error) {
	trace("Unable to upload file.");
}
Advertisements

6 thoughts on “2044 Unhandled _:.

  1. I have a really strange error like this, hopefully you guys have a pointer to why.

    I have a upload flex page that works great with any osx machine that I use (safari and firefox) but throws a 2038 error when using any windows machine (opera and IE)..

    Has anyone seen such an error? and if so, any ideas on the fix would be really apprecialted.

    Thanks
    Blake

    Like

  2. I want to add the clarification for the possible reason of Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.

    Even if the server-side upload script is located at the server at the correct location, this Error#2038 can still happen inside Flash player.

    The reason for this can be a WRONG location for the files to be stored on the server specified inside server-side upload script.

    Inside IE and Firefox the behavior under Flash player during file uploads differs, it definitely worth an effort to test file upload independently under all target browsers

    Like

  3. I would like to add an information about the IO Errors that it can be caused by ModSecurity module in Apache and throws back a 406 http not acceptable error. to get it solved you can add .htaccess file to the script directory and to the destination folder for the file transfer that includes the following:

    SecFilterEngine Off
    SecFilterScanPOST Off

    this will disable the ModSecurity module for that folder.

    Like

  4. Likewise, Taher Mestiri, you have saved me as well. I’ve been pulling out my hair trying to figure out why everything works fine on my local server, then falls apart with 2044 and 2038 errors on my web server.
    Thanks a bunch

    Like

  5. I’m sorry… I don’t know what this mean.
    Anybody could told me how to do this?
    I can’t creat a file names .htaccess in windows vista~~
    Thanks ~~
    I would like to add an information about the IO Errors that it can be caused by ModSecurity module in Apache and throws back a 406 http not acceptable error. to get it solved you can add .htaccess file to the script directory and to the destination folder for the file transfer that includes the following:

    SecFilterEngine Off
    SecFilterScanPOST Off

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s