Jump to content

sftd

New Members
  • Posts

    5
  • Joined

  • Last visited

sftd's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So after a lot of comparing and testing turned out that for some reason `gzuncompress()` version on Linux server needs in this particular data chunk an extra 0 byte at the end (which doesn't bother "correct" chunks, so my solution was to just add 0 byte at the end, to every data chunk). Though probably the best solution would be to upgrade to newer zlib.
  2. I was experimenting with `gzdecode` but in my case it wasn't the solution. Anyway thank you for your help.
  3. It's a part of PDF file I'm parsing. To clarify. My main question here is "does `gzuncompress` give different results because of "OS difference", "PHP version difference", "some other reason" or "impossible to tell".
  4. Thank you for your interest. Here is the "core" of the problem. I separated the chunk of data that I have problem with. Not much code needed to recreate the error difference. `gz-test.txt` in attachment. $var = file_get_contents('./gz-test.txt'); echo gzuncompress($var); - Windows server just outputs uncompressed data. - Linux server throws out the following Warning (data-error): `Warning: gzuncompress(): data error in C:\SfTd\Programming\Projects\PHP\PHKonrad Kojarzenia\www\gz-test.php on line 8` gz-test.txt
  5. I have the following problem: For various reasons I have 30 chunks of data that I'm using gzuncompress() on and have 2 servers: Linux, PHP 5.3.29, zlib 1.2.3 Windows, PHP 5.5.8, zlib 1.2.7.3 - 28 chunks are uncompressed correctly on both servers. - 1 chunk throws error on both servers (but it's expected). - 1 chunk throws error ONLY on Linux server. Can anyone suggest what might be the cause of this and suggest fix that won't require upgrading PHP on Linux server? Thank you for your help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.