dapphp / securimage

PHP CAPTCHA Script
https://github.com/dapphp/securimage
BSD 2-Clause "Simplified" License
568 stars 190 forks source link

Can't load image #72

Closed milosb793 closed 7 years ago

milosb793 commented 7 years ago

Hello @dapphp !

At first, thank you for amazing and hard work! I beg for help. I lose so much time to figure out a problem. I've used your product for my project. It worked everything perfect at localhost. But when i publish it to a server (nginx), i can't even get loaded image. Sound loads well, but image won't display, and refresh button does not work.

There is errors

This is how it's looks like in form: screenshot from 2017-09-27 10 34 17

Thank you for you time!

dapphp commented 7 years ago

Hi, Thanks for the detail and screenshots. Based on the nginx error log you posted, the image doesn't work because it looks like PHP is not configured with any type of gd image support. At 08:06:03, you can see the error "Call to undefined function imagecreate()" which means PHP has no GD support.

You will need to install the gd library for PHP, and also freetype.

milosb793 commented 7 years ago

@dapphp Thank you for fast and detailed answer! I will try this today and left results!

milosb793 commented 7 years ago

That's exactly what i need to do! Thanks man! I did apt-get install php-gd, restarted fpm and nginx and there it's, look that beauty:

screenshot from 2017-09-28 18 23 03

:D

dapphp commented 7 years ago

Awesome possum! Thanks for posting and I'm glad you found Securimage useful :) let me know if I can answer any other questions or help out.