Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QImageControl sample is broken: assets/_core/php/examples/other_controls/image.php #92

Closed
olegabr opened this issue Jan 23, 2013 · 6 comments
Assignees
Milestone

Comments

@olegabr
Copy link
Member

olegabr commented Jan 23, 2013

QImageControl sample is broken: assets/_core/php/examples/other_controls/image.php

gzuncompress() [function.gzuncompress]: data error

Error Type: E_WARNING

Source File: /home/olegabr/work/olegabr.qcubed.git/includes/qcubed/_core/base_controls/QImageControlBase.class.php Line: 193

Line 188: $strData = str_replace('_', '/', $strData);
Line 189:
Line 190: $strData = base64_decode($strData);
Line 191:
Line 192: if (function_exists('gzcompress'))
Line 193: $strData = gzuncompress($strData);
Line 194:
Line 195: $objLabel = unserialize($strData);
Line 196: $objLabel->RenderImage();
Line 197: }
Line 198:
Call Stack:

N0 (): QcodoHandleError()
N1 /home/olegabr/work/olegabr.qcubed.git/includes/qcubed/_core/base_controls/QImageControlBase.class.php(193): gzuncompress()
N2 /home/olegabr/work/olegabr.qcubed.git/assets/_core/php/image.php(9): QImageControlBase::Run()

It seems that not everyone is affected, @scottux can not reproduce it here: #29

I'll try to investigate it on my local machine.

@scottux
Copy link
Member

scottux commented Jan 24, 2013

What is your PHP version and platform? I don't know right off hand why gzuncompress would bomb on you.

@olegabr
Copy link
Member Author

olegabr commented Jan 24, 2013

php -v
PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.2.1, Copyright (c) 2002-2012, by ionCube Ltd., and
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH

it's an 64bit ubuntu, but I have the same error on my debian system too.

And I don't think that is the gzuncompress that produces the problem. The problem is elsewhere, but ends in gzuncompress because input to it was already wrong.

@scottux
Copy link
Member

scottux commented Jan 24, 2013

Do you have mcrypt installed? Does the qcryptography example work?

@olegabr
Copy link
Member Author

olegabr commented Jan 24, 2013

mcrypt installed and the example works well

@scottux
Copy link
Member

scottux commented Mar 4, 2013

It is working on the example site: http://examples.qcu.be/assets/_core/php/examples/other_controls/image.php

olegabr added a commit to olegabr/qcubed that referenced this issue Mar 17, 2013
…or file name length.

* It fixes issues qcubed#92 and qcubed#152
* The example of QImageLabel is changed to use CacheFolder property.
* The exception is throwed if the CacheFolder is not specified and the resulting file name length exceeds the 255 limit.
@olegabr
Copy link
Member Author

olegabr commented Mar 17, 2013

The resolution proposed here: bug-152. Waits for the #188 to be accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants