Welcome Guest, Not a member yet? Register   Sign In
image_lib showing nothing
#1

[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?
#2

[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
#3

[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?
#4

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




Theme © iAndrew 2016 - Forum software by © MyBB