![]() |
Image manipulation not working on localhost - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Image manipulation not working on localhost (/showthread.php?tid=14387) Pages:
1
2
|
Image manipulation not working on localhost - El Forum - 12-31-2008 [eluser]Unknown[/eluser] Hello guys, I am new to CI, but I've used couple of other frameworks (Zend,CakePHP and couple of custom built ones). So far I like it - it's lighter than Zend, and faster than Cake. But I have problem with the image manipulation class. It is not working on my local machine.I use the documentation saying: Code: $config['image_library'] = 'gd2'; I have GD/GD2 installed, and the whole process is going good, no errors, and I receive response "true" when I do "echo $this->image_lib->resize();", but no manipulation was done, neither a file was created. I don't know if I am missing something here ... I tried to use $config['new_image'] = '/upload/testNEW.php'; and $config['create_thumb'] = FALSE; so I can get at least a duplicate file, but it didn't work too. I used the upload class - and it's working fine for me ... Is there a way to trace why it is not creating the image? Thanks. Image manipulation not working on localhost - El Forum - 12-31-2008 [eluser]Phil Sturgeon[/eluser] Have you got write permissions for folders? Image manipulation not working on localhost - El Forum - 12-31-2008 [eluser]Unknown[/eluser] yes, I have permission. It is loading the class without problems and it's executing $this->image_lib->resize(); without any error - it looks like it is doing the job, but it is not ... Image manipulation not working on localhost - El Forum - 01-27-2009 [eluser]dsheetz[/eluser] I'm having the same problem. Did you get any resolution to this issue? Image manipulation not working on localhost - El Forum - 01-27-2009 [eluser]IkoTikashi[/eluser] Try setting the full path to the source image, i.e. /var/www/vhosts/myhost/upload/image.jpg Image manipulation not working on localhost - El Forum - 01-27-2009 [eluser]dsheetz[/eluser] That's what I'm doing. I don't understand why no errors are being reported, when clearly no images are being produced. Just to make sure, here's the code I'm using: --- $filename = "photo1.jpg"; $config['image_library'] = 'gd2'; $config['source_image'] = PHOTOS_DIR . $filename; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $this->load->library('image_lib', $config); if (!$this->image_lib->resize()) { echo $this->image_lib->display_errors(); } --- Has anyone even gotten the error reporting working for this library? Image manipulation not working on localhost - El Forum - 01-27-2009 [eluser]IkoTikashi[/eluser] Hm, I just tested it with CI1.7 and everything seems to be working fine, except that no errors are thrown when the folder is not writable. Setting permissions on my folder solved the problem - the thumbnail has been generated. I guess that the file IS indeed resized, but then can't be saved to the folder. You could use Code: $this->load->library(‘image_lib’, $config) Image manipulation not working on localhost - El Forum - 01-27-2009 [eluser]dsheetz[/eluser] It's not a permissions problem... the dir is set to 777. Why wouldn't any errors be generated? Why bother having an error array that doesn't print? I'm starting to think this is a server config issue. How can I determine whether or not gd/gd2/imagemagick are installed and configured properly? From my phpinfo(): PHP Version 4.4.8 GD Support - enabled GD Version - bundled (2.0.28 compatible) (no mention of imagemagick) Help! This is totally derailing my project. Thanks, Dan Image manipulation not working on localhost - El Forum - 01-28-2009 [eluser]dsheetz[/eluser] +1 Image manipulation not working on localhost - El Forum - 01-28-2009 [eluser]IkoTikashi[/eluser] Can you see the image in your browser when you add the following code? Code: $config['dynamic_output'] = TRUE; Have you tried using Code: $config['image_library'] = 'gd'; |