![]() ![]() SecurityError: Error #2123: Security sandbox violation:Īdobe went through a number of phases making the rules for serving and checking Policy files stricter. You probably found this because you're trying to make a socket connection from Flex/Flash and getting the following error: Makes me wonder if I'm doing this to chase that feeling or if it's just a side affect. Now knowing this had a solution and that I'm not gonna have to run through a field at night with a town's worth of pitchforked locals chasing me I feel expansive relief. But after 5 hours the frustration overwhelmed my capacity for dreaming and I leaped out of the surreal scene and into another one -Dreamweaver. I collapsed asleep last night with this unsolved, I had nightmares that alluded to it. There were two knew columns added since I backed it up that I had forgotten about in the haze, one of which caused the MySQL query to fail. ![]() The reason it suddenly broke was that while editing the database at 5am this morning on no sleep I hit the wrong button - so instead of deleting a column I accidentally dropped a whole table. After a quickly unpleasant hunt through 1000+ lines of code I found a mysql query that was failing outside of an if/else clause. (Once I re-realized that it wasn't a regular rational IOError. In fact everything related to files was correct. ![]() Today however I was _shocked_ to find the crazy IOError because this time I knew all the paths were correct. move_uploaded_file($_FILES, $incorrect_relative_file_path) ![]() The path's are relative and I'm dyslexic, nuff said. Then about 20 minutes later the same mysterious IOError popped up, but this time it was the server path I was moving the upload to. In the following code that's the upfile1 part. The first time this happened to me yesterday it happened because the upload name when I was getting the filesize of the temp upload file was wrong. Reading this now you are appropriately upset, but wait another second. There are a ton of reasons why your upload script might fail in such a way that it triggers this error in flex, or in a non-debug version of your app just stay stuck at 0%, and it might not be immediately apparent or fun to track down. But thankfully Adobe went the mysterious route and made this as ambiguous as possible. Now hold on, you'd think IOErrors would only happen if the upload script URL was wrong or broken, like if you missed a semicolon in your php or some silly thing like that. The possible causes just increased by an order of 50.ī efore you break something in your office, you should know that File Reference IOErrors can be triggered by a failing server upload script. Finally you resort to Debugger breakpoints throughout the function and you discover it's actually being triggered by the call to fileRef.upload(). Despite what the compiler is telling you, you expand the try/catch statement to your whole uploading function hoping to narrow the issue down, but it does nothing. You vain a try/catch statement and it catches nothing. "WAHT!," you try an Event Listener and it does nothing. Flash(Flex) Builder is telling you there's an IOError, but the line number given is where you set the local path of the File Reference. So you're in Flash or Flex and your fileRef is failing to upload. So the lesson is blogging about this stuff as it happens saves time regardless of deadlines. This happened twice in the last two days and for the second occurrence I totally forgot what the issue was the first time I fixed it. ![]()
0 Comments
Leave a Reply. |