php - Laravel captcha image not working in production but dev is ok -
i'm using following package johntaa/laravel-captcha enable captcha input on site. works fine in dev environment. however, in prod can't find image (present blank).
code
//login page @if (session::has('show_captcha')) <div class="form-group"> <label for="captcha">captcha</label> <p>{{ html::image(captcha::img(), 'captcha image') }}</p> {{ form::text('captcha',null,array('class' => 'form-control', 'placeholder' => 'enter characters'))}} </div> @endif //html output snippet in dev <p><img src="http://localhost:8888/mysite/public/captcha?730518" alt="captcha image"></p> //html output snippet in prod <p><img src="http://mysite/captcha?262091" alt="captcha image"></p>
clicking on dev link yields result prod link errors to:
call undefined function johntaa\captcha\imagecreatefrompng()
file location:
../vendor/johntaa/captcha/src/johntaa/captcha/captcha.php
more issue gd
module isn't installed. phpinfo()
check.
if isn't enabled do:
sudo apt-get install php5-gd
to install (on ubuntu).
Comments
Post a Comment