#29820 [Opn->Bgs]: Variable is treated differently in header() vs print()

2004-08-24 Thread ericp at amazon dot com
 ID:   29820
 User updated by:  ericp at amazon dot com
 Reported By:  ericp at amazon dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Variables related
 Operating System: Linux 2.4.21-2.3a i686
 PHP Version:  5.0.1
 New Comment:

It was a problem in Mozilla's Developer Tools...It reruns the query to
get the response headers ...


Previous Comments:


[2004-08-24 17:00:39] ericp at amazon dot com

Description:

If I include a serialized variable in header() it produces an entirely
different result than if I just print() the result...

I've also tested: 4.3.3, 5.0.0 and of course 5.0.1 and its reproducable
in both scenario

Make sure you POST the form to get the variable back :)

even a strlen($s) will produce different results...its weird.

Thanks,

Eric

Reproduce code:
---







bash-2.05$

Expected result:

Response Headers 

Date: Tue, 24 Aug 2004 14:49:52 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) PHP/5.0.1 mod_ssl/2.8.12
OpenSSL/0.9.6b
X-Powered-By: PHP/5.0.1
X-CacheDebug-five: a:1:{s:3:"foo";s:3:"bar";}
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

a:1:{s:3:"foo";s:3:"bar";}










Actual result:
--
Response Headers 

Date: Tue, 24 Aug 2004 14:49:52 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) PHP/5.0.1 mod_ssl/2.8.12
OpenSSL/0.9.6b
X-Powered-By: PHP/5.0.1
X-CacheDebug-five: a:0:{}   <--- WHAT?!?
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

a:1:{s:3:"foo";s:3:"bar";}














-- 
Edit this bug report at http://bugs.php.net/?id=29820&edit=1


#29820 [NEW]: Variable is treated differently in header() vs print()

2004-08-24 Thread ericp at amazon dot com
From: ericp at amazon dot com
Operating system: Linux 2.4.21-2.3a i686
PHP version:  5.0.1
PHP Bug Type: Variables related
Bug description:  Variable is treated differently in header() vs print()

Description:

If I include a serialized variable in header() it produces an entirely
different result than if I just print() the result...

I've also tested: 4.3.3, 5.0.0 and of course 5.0.1 and its reproducable in
both scenario

Make sure you POST the form to get the variable back :)

even a strlen($s) will produce different results...its weird.

Thanks,

Eric

Reproduce code:
---







bash-2.05$

Expected result:

Response Headers 

Date: Tue, 24 Aug 2004 14:49:52 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) PHP/5.0.1 mod_ssl/2.8.12
OpenSSL/0.9.6b
X-Powered-By: PHP/5.0.1
X-CacheDebug-five: a:1:{s:3:"foo";s:3:"bar";}
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

a:1:{s:3:"foo";s:3:"bar";}










Actual result:
--
Response Headers 

Date: Tue, 24 Aug 2004 14:49:52 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) PHP/5.0.1 mod_ssl/2.8.12
OpenSSL/0.9.6b
X-Powered-By: PHP/5.0.1
X-CacheDebug-five: a:0:{}   <--- WHAT?!?
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

a:1:{s:3:"foo";s:3:"bar";}










-- 
Edit bug report at http://bugs.php.net/?id=29820&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29820&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29820&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29820&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=29820&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=29820&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=29820&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=29820&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=29820&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29820&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=29820&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29820&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29820&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=29820&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29820&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=29820&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=29820&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29820&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29820&r=float