php - laravel 5.1 queues undefined function in handle() but working in constructor -


i use laravel 5.1 queues process large images. i've strange behavior since when call function "imagettfbbox" in constructor works. need make work in "handle" there got error.

public function __construct() {     //test     $font_path = public_path('/fonts/roboto/roboto-thin.ttf');      imagecreate(10,10); //works!     imagettfbbox(10, 0, $font_path, 'test'); //works! }  public function handle() //generateimage $generator, image $img {     //test     print 'ok'; //gets printed     $font_path = public_path('/fonts/roboto/roboto-thin.ttf');      imagecreate(10,10); //works!     imagettfbbox(10, 0, $font_path, 'test'); //crashes! } 

i 'ok' printed , error "call undefined function app\jobs\imagettfbbox()". strange behavior since image functions work other not. i've gd installed , everywhere outside handle code works. clue i'm missing here?

maybe missing freetype library needed imagettfbbox


Comments