Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
| From: | Daniel Schierbeck | Date: | Tue, 24 Aug 2004 11:53:04 +0000 |
| Subject: | Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194563@lists.php.net to get a copy of this message | ||
Eric Peters wrote:
I think I've boiled my problem....for some reason I can't header() a serialized $_POST variable Running PHP 5.0 Final (and also tested with 4.3.3): -- begin file -- <?php function jpcache_debug2($s) { header("X-CacheDebug-five: $s"); print $s; } $myVariable = serialize($_POST);Try to use unserialize(); -- Daniel Schierbeckjpcache_debug2($myVariable);?> <html> <body> <form method="POST" action="test-error.php"> <input type="hidden" name="foo" value="bar"> <input type="submit" value="blah"> </form> </body> </html> -- end file -- Response Headers - Begin output: Date: Mon, 23 Aug 2004 23:56:14 GMT Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/5.0.0 mod_ssl/2.8.12 OpenSSL/0.9.6b X-Powered-By: PHP/5.0.0 X-CacheDebug-five: a:0:{} Connection: close Transfer-Encoding: chunked Content-Type: text/html a:1:{s:3:"foo";s:3:"bar";} <html> <body> <form method="POST" action="test-error.php"> <input type="hidden" name="foo" value="bar"> <input type="submit" value="blah"> </form> </body> </html> Anyone know why my header() output behaves so funky? Thanks, Eric