ID: 25224 Updated by: [EMAIL PROTECTED] Reported By: r dot staribacher at hypermove dot com -Status: Feedback +Status: No Feedback Bug Type: Zlib Related Operating System: windows 2000/xp PHP Version: 4.3.2 New Comment:
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2003-08-24 14:48:25] [EMAIL PROTECTED] Can you provide a self-contained example without this pdf class and with concrete data? Maybe save and base64_encode the data which should be gzuncompress()ed. Also "1" isn't a good choice for the optional length parameter to gzuncompress() if you want more than a single character. This parameter contains the maximal expected length of the uncompressed data. ------------------------------------------------------------------------ [2003-08-24 13:00:12] r dot staribacher at hypermove dot com Description: ------------ error occured on: OS: windows 2000 and xp webserver: apache and iis I am using a PHP class for reading pdf files. this class uses gzuncompress which causes problems on windows. IE displays the message "action canceled". Under Linux it "seems" to work. Parsing a large amount of pdf files also causes the process to stop. I have seen the Bug #20535: zLib crashes when trying to gzuncompress. So I tried to solve the problem using the optional length parameter. That didn't solve the problem. you can see or download the class on: http://www.phpclasses.org/browse.html/package/702.html I tried also xpdf (pdftotext.exe) to read PDFs using exec(), but another problem (unable to fork ...) occured! But this is not part of my bug report, but also annoying. One question: We can create PDFs using PHP! Why can't we read PDFs using PHP? It should be easier reading them instead of creating them? php.ini settings: savemode = off magic quotes = off no additional modules are activated (gzip is already compiled into php 4.3) Reproduce code: --------------- function nextline() { $pos = strpos($this->_buffer, "\r"); if ($pos === false) { return false; } $line = substr($this->_buffer, 0, $pos); $this->_buffer = substr($this->_buffer, $pos + 1); if ($line == "stream") { $endpos = strpos($this->_buffer, "endstream"); $stream = substr($this->_buffer, 1, $endpos - 1); $stream = gzuncompress($stream,1); $this->_buffer = $stream . substr($this->_buffer, $endpos + 9); } return $line; } Expected result: ---------------- The code will return an integer (how many times is the search expression in the pdf document). The original class returns true (found search expression) othewise false I think! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25224&edit=1