gzuncompress

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
susscorfa
Posts: 7
Joined: Thu 16. Feb 2006, 12:18

gzuncompress

Post by susscorfa »

hi

i'm having a problem with the map cnt part when i click open map in the admin i get the folowing error message

Warning: gzuncompress() [function.gzuncompress]: data error in /**cut**/www/include/inc_tmpl/content/cnt51.open.php on line 42


that is produces by the following code does any one know a solution to the problem

Code: Select all

<?php

//include('../../inc_conf/conf.inc.php');
include('../../../config/phpwcms/conf.inc.php');
$img = rawurlencode('../../../'.$phpwcms["templates"].'/inc_cntpart/map/map_img/'.$_GET['map']);
$map = '';
$p = array();

if(isset($_GET['points'])) {
        $points = explode(':|:', gzuncompress(base64_decode($_GET['points'])));
        if(count($points)) {
                foreach($points as $value) {
                        $point = explode(':::', $value);
                        $map .= '<area shape="rect" coords="'.($point[0]-3).','.($point[1]-3);
                        $map .= ','.($point[0]+4).','.($point[1]+4).'" href="#" title="';
                        $map .= $point[2]."\">\n";
                        $p[] = $point[0].'x'.$point[1];
Will
Posts: 55
Joined: Mon 9. Aug 2004, 05:30

Post by Will »

Hello,

I'm having the very same problem... I think it is that the variable $_GET['points'] is empty or sort of.

Anyone knows a way to solve this?

All best,
Will
Will
susscorfa
Posts: 7
Joined: Thu 16. Feb 2006, 12:18

Post by susscorfa »

i looked at that but the variable is not empty if i do a vardump of it

bart
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Will wrote:Anyone knows a way to solve this?

All best,
Will
Maybe you could temporarily turn on all PHP errors and notices and retry. Maybe something will be reported? The gzuncompress() requires the input parameter to be a string compressed with gzcompress() which is done here:
"cnt51.inc.php"

Code: Select all

echo '&points='.base64_encode(gzcompress(implode(':|:', $map_xy)));
Garbage In ~might equal~ Garbage Out ( in other words...proper Extraction requires proper Compression )

Code: Select all

string gzuncompress ( string data [, int length])
This function takes data compressed by gzcompress() and returns the original uncompressed data or FALSE on error. The function will return an error if the uncompressed data is more than 256 times the length of the compressed input data or more than the optional parameter length.


Just a thought!
Post Reply