ID:               14939
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Zlib Related
 Operating System: Apache
 PHP Version:      4.1.1
 New Comment:

Does this script work if you don't provide a compression level?


-- robin


Previous Comments:
------------------------------------------------------------------------

[2002-01-08 21:04:16] [EMAIL PROTECTED]

Receive the following error with only 15 consecutive characters
entered.

Warning: gzinflate: buffer error in
/usr/local/apache/elca_rmg/class.FTemplateExt.php on line 153

What follows is the code updating the SQL files:

$gzsize = strlen($description) + 4;  // added 4 more than req'd
$gzcompress = gzdeflate ($description,6);
$gzcompress = addslashes($gzcompress);  //Reqd for SQL updates

$query = "UPDATE htmlcontent SET record_nbr = \"$record_nbr\",
gzcompress = \"$gzcompress\", gzsize = $gzsize WHERE record_nbr =
\"$record_nbr\"";
                  }
general_update($errno,$errmsg,$rowsaffected, $result, $s_synod_id,
$query);   // UPDATE the record

*******************************************************
Next I attempt to read the record back and unzip gzcompress
Note that $description consists of 20 'a' characters.  Any repetitive
char will do and only 15 to 20 are req'd
*******************************************************

$query = "SELECT * FROM htmlcontent WHERE record_nbr =
\"$record_nbr\"";
       
general_read($errno, $errmsg,$numrows, $result_html, $s_synod_id,
$query);
       
if  ($numrows > 0) {
    if ($row_html = mysql_fetch_array ($result_html)) {
         $content = stripslashes($row_html["gzcompress"]);
         if (strlen($content) > 0) {
******Error occurs on the following instruction*********
            $new = gzinflate($content,$row_html["gzsize"]);
            

------------------------------------------------------------------------


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

Reply via email to