JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 98 forks source link

error_log being produced with convert errors #124

Open badbadmonkey opened 6 years ago

badbadmonkey commented 6 years ago

I'm getting dozens of these kinds of errors being appended to the PHP error_log in the phpThumb directory. They're all consistent to line 484 phpThumb.functions.php , but the strange thing is I cannot see how to replicate them - i.e. all the images in question appear to always be generated, and some of these convert commands clearly don't relate to images at all.

[10-Jul-2018 03:37:48 America/Chicago] PHP Warning:  shell_exec(): Unable to execute 'convert -help 2>&1' in /home3/peters/public_html/include/phpthumb/phpthumb.functions.php on line 484
[10-Jul-2018 03:37:48 America/Chicago] PHP Warning:  shell_exec(): Unable to execute 'convert logo: -resize 1x '/home3/peters/public_html/include/phpthumb/cache/pThumbMpvDm1' 2>&1 2>&1' in /home3/peters/public_html/include/phpthumb/phpthumb.functions.php on line 484
[10-Jul-2018 13:23:26 America/Chicago] PHP Warning:  shell_exec(): Unable to execute 'convert -help 2>&1' in /home3/peters/public_html/include/phpthumb/phpthumb.functions.php on line 484
[10-Jul-2018 13:23:26 America/Chicago] PHP Warning:  shell_exec(): Unable to execute 'convert logo: -resize 1x '/home3/peters/public_html/include/phpthumb/cache/pThumbqOttZ1' 2>&1 2>&1' in /home3/peters/public_html/include/phpthumb/phpthumb.functions.php on line 484
[10-Jul-2018 13:23:26 America/Chicago] PHP Warning:  shell_exec(): Unable to execute 'convert '/home3/peters/public_html/photos/patagonia/090726-1-ushuaia.jpg[0]' -background '#FFFFFF' -resize '1080x' -sampling-factor 1x1 jpeg:'/home3/peters/public_html/include/phpthumb/cache/pThumbqOttZ1' 2>&1 2>&1' in /home3/peters/public_html/include/phpthumb/phpthumb.functions.php on line 484

Any idea if this is a clue to something I'm doing wrong, or is there a bug?

badbadmonkey commented 4 years ago

I'm still having this issue with megabytes of errorlog being accrued. It's always line 484 @ phpthumb.functions.php and I notice that the line $command .= ' 2>&1'; // force redirect stderr to stdout @ line 465 above is being logged in HTML encoding... 2>&1 , is this unexpected?