looks like what i said may be the case, iv attached each file, header.htm is
standard html output. header.htm.php.gz is the output that php gives when told to
compress then the next is the html gzip'd from the command prompt
I did a hexdump of each - I don't know the exact header specs on gzip, though I can maybe try to find them somewhere - but here's the first little bit of each (at the bottom)
If I had to guess, I'd say they diverge at the beginning due to the filename and permissions being embedded, and at the end because of checksum differences, but that's just a guess. The real question is whether the browser expects filenames and such in the "gzipped" file, or exactly what format it does want. I'd be interested to know.
hexdump -c header.htm.real.gz
0000000 037 213 \b \b 251 006 \ 9 002 003 h e a d e r
0000010 . h t m . r e a l \0 265 Y m o 342 F
0000020 020 376 \ ~ 305 340 223 \b 026 004 0 306 364 r 306 9
0000030 235 256 R 333 S 323 T J _ > 024 - 366 002 233
0000040 232 265 265 266 ! 247 S 376 { g m 374 006 266 271 244
.
.
00005f0 p \a 356 X H 341 . 213 330 234 F 343 e / 4 257
0000600 237 F 243 341 - 251 > 215 F u 032 215 g 245 261 231
0000610 277 252 366 204 177 345 213 232 374 222 275 272 305 257 021 362
0000620 3 371 017 305 177 036 327 V 341 251 030 \0 \0
hexdump -c header.htm.php.gz
0000000 x 332 265 Y m o 342 F 020 376 \ ~ 305 340 223 \b
0000010 026 004 0 306 364 r 306 9 235 256 R 333 S 323 T J
0000020 _ > 024 - 366 002 233 232 265 265 266 ! 247 S 376
0000030 { g m 374 006 266 271 244 311 227 200 w g g 236 }
0000040 346 231 331 5 231 m 302 255 { 335 232 m ( q 360 #
.
.
00005d0 376 352 } G 205 374 235 211 p \a 356 X H 341 . 213
00005e0 330 234 F 343 e / 4 257 237 F 243 341 - 251 > 215
00005f0 F u 032 215 g 245 261 231 277 252 366 204 177 345 213 232
0000600 374 222 275 272 305 257 021 362 3 376 017 305 177 b 327 314
0000610 351