CodeIgniter Forums
image_lib showing nothing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: image_lib showing nothing (/showthread.php?tid=40078)



image_lib showing nothing - El Forum - 03-29-2011

[eluser]Unknown[/eluser]
For the life of me, I can't figure out why image_lib (the image manipulation library) in CodeIgniter isn't working. I have it working perfectly fine on my local machine, so I know the code is right. But when I upload to a production server, trying to create a thumbnail from an image just stops the code dead in its tracks.

The kicker is that image_lib isn't spitting back an error message... the page just _stops_ at that point... Here's my code snippet

Code:
$config = array(
        'source_image' => '/data/servers/misc/www_thesite_com/files/originals/thepicture.jpg',
        'new_image' => '/data/servers/misc/www_thesite_com/files/thumbs',
        'maintain_ratio' => true,
        'create_thumb' => true,
        'width' => 150,
        'height' => 100
    );
    $this->load->library('image_lib', $config);
    $this->image_lib->resize();
    $ThumbnailName = 'thepicture_thumb.jpg';


I've tried checking using the following code too:

Code:
if (!$this->image_lib->resize()) {
         echo $this->image_lib->display_errors();
    }

But, nothing happens. Everything just _stops_ at $this->image_lib->resize(); without throwing any error whatsoever.

One other note... GD2 is successfully installed. I'm able to perform other standard image manipulation without a hitch when not using CodeIgniter.

Any ideas?


image_lib showing nothing - El Forum - 03-29-2011

[eluser]InsiteFX[/eluser]
Did you check your log files?
Your log files should tell you what is going on!

It Could be a path problem etc.

InsiteFX


image_lib showing nothing - El Forum - 03-29-2011

[eluser]@li[/eluser]
Very possible that your server has got error reporting turned off, a fatal error occurs for some reason in the code and because it can't be reported, the script just stops without any message.

Has the server got all the necessary extensions/libraries needed for it to work?


image_lib showing nothing - El Forum - 04-01-2011

[eluser]Unknown[/eluser]
Thanks for the log reminder. I was setting this up and forgot to check the php memory limit... problem solved!