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);
jpcache_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
Try to use unserialize();
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php