Welcome Guest, Not a member yet? Register   Sign In
[split] CI3.1.0 image library broken
#4

(This post was last modified: 11-08-2016, 11:19 PM by andoyoandoyo.)

(11-07-2016, 06:15 AM)spjonez Wrote:
(11-06-2016, 11:14 PM)John_Betong Wrote:
(11-04-2016, 07:26 AM)spjonez Wrote: The image library has been broken when using Imagemagik since version 3.1.0. I've reported this twice now.

https://github.com/bcit-ci/CodeIgniter/issues/4902

I managed to fix the Image_lib.php by adding a space:

CodeIgniter-3.1.2/system/libraries/Image_lib.php
// about line 888
PHP Code:
# John_Betong ADDED LEADING SPACE - 2016-11-05
 
 $cmd .= ' ' .escapeshellarg($this->full_src_path) .' '.escapeshellarg($this->full_dst_path).' 2>&1'

Edit:
Problem was no space after the image dimensions:
Quote:/* # ORIGINAL HAS MISSING LEADING SPACE
 $cmd .= escapeshellarg($this->full_src_path).' '.escapeshellarg($this->full_dst_path).' 2>&1';

 $cmd = '
 /etc/alternatives/convert
  -quality 84
  -resize 128x100'/home/john-betong/www/afiles/images/douglas-adams-happy-towel-day.jpg'
 '/home/john-betong/www/thumb/douglas-adams-happy-towel-day_thumb.jpg' 2>&1'
;

*/

Yes I know I included the proper fix in both of the GitHub issues I opened. Thanks for posting it here in case others run into it and don't check the repo.

I tried this method but doesn't work for me. Finnaly I switched back to CI 3.1.0. Sad
Reply


Messages In This Thread
[split] CI3.1.0 image library broken - by spjonez - 11-04-2016, 07:26 AM
RE: CodeIgniter 3.1.2 released - by John_Betong - 11-06-2016, 11:14 PM
RE: CodeIgniter 3.1.2 released - by spjonez - 11-07-2016, 06:15 AM
RE: CodeIgniter 3.1.2 released - by andoyoandoyo - 11-08-2016, 11:19 PM
RE: CodeIgniter 3.1.2 released - by bfedderm - 11-09-2016, 07:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB