I recently ran into an issue with a flash uploader that took several days of off and on work to figure out. Hopefully my time investment can save you some of your own time investment.

To set the stage, we had a production system and a development system. Both had identical code. On production, the flash uploader worked perfectly. On development, the uploader immediately threw an error.

I started by checking the obvious. File permissions, PHP upload size and post size settings, and regular html file upload. All of those checked out.

Next I analyzed the HTTP requests, I could see that there wasn't even a call from the flash to the upload endpoint of our application. That's where things started to get interesting. We were using uploadify, but it was an incredibly old version, so updating was out of the question.

I took advantage of the callbacks in uploadify, and was able to get the JSON objects related to the upload. The only information I useful information contained in the JSON objects was an Upload Error #2038. After searching for this, I couldn't find any specific descriptions of what the error meant, until I lucked upon a mailing list. I can't even find the list anymore. It turns out, the problem was the SSL certificate.

On production, we had a valid SSL certificate. On development, we had a self-signed "snakeoil" certificate. This meant that on development the browser would notify you of the bad certificate, but you could just accept it and continue. With Flash, it really didn't want to do that. This is probably due to some of the strict security rules in Flash. Overall, it is a good thing that Flash rejects it, but it would be nice to have a bit more information about what is going on.

Long story short, if you're getting the upload error #2038 with a flash uploader, make sure your SSL certificate is valid for the domain you are using.

 

Posted
AuthorMichael Cantrell