Hello,
First of all I am using the 1.2.2 demo version of CKFinder.
Here is my problem : when i upload a picture it creates well the thumbnail but then doesn't display it (it display the question mark instead). If I select the picture it shows it well in the preview part.
If I take the URL of my picture and try to acces via the url my thumbnail it display the thumbnail. E.G. : http://www.mydomain.com/share/picture1.png and http://www.mydomain.com/share/_thumbs/I ... cture1.png works well and both display the picture and the thumbnail.
Here is a part of my conf file :
$baseUrl = '/share/'; $config['Thumbnails'] = Array( 'url' => $baseUrl . '_thumbs', 'directory' => $baseDir . '_thumbs', 'enabled' => true, 'maxWidth' => 100, 'maxHeight' => 100, 'quality' => 80); $config['ResourceType'][] = Array( 'name' => 'Images', 'url' => $baseUrl , 'directory' => $baseDir, 'maxSize' => 0, 'allowedExtensions' => 'bmp,gif,jpeg,jpg,png', 'deniedExtensions' => '');
Re: [PHP] Thumbnail created but not displayed
Best Regards,
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: [PHP] Thumbnail created but not displayed
the ckfinder/core/connector/php/php5/commandHandler/Thumbnail.php use the @ob_end_clean function and it generates a notice (not displayed in CKFinder but logged with my log system): "ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete."
I don't understand why it reacts like this because the @ should avoid this notice... i tried to put error_reporting(0) before but it stills generate the notice...
I solved the problem doing this :
It test if their is any buffering "working" and doesn't clean the buffer stamp if not needed --> no notice.
I don't know if i've been doing something wrong with my error and exception handler? Tell me please if my solution is a good protection to add to CKFinder code.
Re: [PHP] Thumbnail created but not displayed
Anyway, I was wondering whether not to add similar code as you posted above
so I think I'm really gonna add it in the next release.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: [PHP] Thumbnail created but not displayed
Yes i use my own error_handler and has i had fear my problem came from that :
If you put a @ before an instruction PHP still go in your error handler function, to fix this you can put :
at the beginning of your error handler.
In fact @ <==> error reporting = 0 just for the current instruction. But it still goes in your custom error handler function.
==> To sum up : the problem came from my custom error handler, but you can still put the test !empty(ob_list_handlers() in the next release if you feel it is safer.
Thanks for your help on this topic Wiktor.