[Phpmyadmin-devel] Inline JPEG transformation fails

Marc Delisle marc at infomarc.info
Sat Jun 30 21:38:25 CEST 2012

Le 2012-06-30 06:38, Alex Marin a écrit :
> On Sat, Jun 30, 2012 at 9:50 AM, Chanaka Dharmarathna <
> pe.chanaka.ck at gmail.com> wrote:
>> Hi  Alex,
>>> mimetype = Image_JPEG
>>>> transformation = Image_JPEG_Inline.class.php
>> I have set the mime type and browser transformation in above format in
>> order to display images.
>> Images are shown without an issue.
> That's good, because it's not working for me with PHP 5.4.4.
> But I'm getting following warning with the mime types Image_JPEG and
>> Image_PNG.
>> Warning in ./libraries/DisplayResults.class.php#4582
>> strpos() expects parameter 1 to be string, object given
> I don't get that warning, but it is indeed a problem. I fixed it here [1].
> Please tell me if you get some other warning, because I don't know
> why I can't see it. And also, when do you get this (f.e. when browsing
> a table with the Image_JPEG transformation)?
> Instead, I get some other warning: in ./libraries/common.inc.php#275
> date_default_timezone_get(): It is not safe to rely on the system's
> timezone settings. [..]
> Should I do any other configuration in addition to reset the mime types and
>> browser transformations as Marc mentioned ?
> The thing is that the old transformations (image_jpeg__inline.inc.php)
> are not compatible yet with the new transformations plugins. So no
> configuration is needed, I will first have to make this backwards
> compatible.
> [1] https://github.com/phpmyadmin/phpmyadmin/pull/76/files

about backward compatibility (BC), it's now apparent that choosing to
put a script name inside pma_column_info.transformation was a decision
that has shortcomings.

Maybe there should be some kind of neutral string there, that is not a
script name nor a class name, but just indicates the kind of
transformation. Then, the code would map this string to the exact script
to call.

Anyway, we have to decide if the BC will be done by some permanent code
in the transformation logic, or via a conversion script that the user
has to run.

Maybe, a version number in pma_column_info would help, to see if
conversion is needed.

Marc Delisle

More information about the Developers mailing list