kael.shipman Posted October 20, 2007 Share Posted October 20, 2007 Hey everyone, I've got an undo framework that I built to handle edits on a site. I can't post a URL cause it's a private site. The framework is centered around two objects, "Command" and "Action". Within a given Command, there is an array of Actions. That should be sufficient information for this discussion, but if you need more detail, I'll gladly provide. What's happening is that I create a new Command, add a bunch of Actions to it, then serialize it and store it in the database for the next pageload, where I add more Actions to the same Command and then finally execute the Command. I escape it properly when inserting into the database, then when I retrieve it, I unescape it (both with a SmartSlashes function that's a little more robust than the standard) and then unserialize it. The problem is that when I hit the submit button to move to the next page, instead of loading the next page, a download dialog pops up wanting me to download index.php. I tried doing that once just to see what would happen and it was just a blank file. I traced the cause of the download dialog to the use of unserialize, but can't figure out where my error is. The serialized string is 55,000 characters, so I can't really go through and find out where the problem is, either. I tried unserializing a smaller object string and it worked fine. Does anyone have any ideas on what might possibly be causing unserialize to change the output to a downloadable file or how to get it to stop doing that? Thanks for anything you can offer. Quote Link to comment https://forums.phpfreaks.com/topic/74101-unserialize-error-forces-download-dialog-instead-of-regular-pageload/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.