Giter Site home page Giter Site logo

Comments (11)

Gregwar avatar Gregwar commented on June 6, 2024

Do you have the GD library installed?

from captcha.

chippyash avatar chippyash commented on June 6, 2024

I have exactly same issue:
Fatal error: Uncaught Error: Call to undefined function Gregwar\Captcha\imagettfbbox() in /../vendor/gregwar/captcha/CaptchaBuilder.php on line 327
changing that line to
$box = \imagettfbbox($size, 0, $font, $phrase);
gives:
Fatal error: Uncaught Error: Call to undefined function imagettfbbox() in /.../vendor/gregwar/captcha/CaptchaBuilder.php on line 327

php -v
PHP 7.0.17 (cli) (built: Mar 21 2017 18:44:58) ( NTS )

$ php -m | grep gd
gd

chucking a phpinfo(INFO_MODULES) into the code reveals:

GD Support	enabled
GD Version	bundled (2.1.0 compatible)
GIF Read Support	enabled
GIF Create Support	enabled
PNG Support	enabled
libPNG Version	1.6.20
WBMP Support	enabled
XBM Support	enabled

Hope that is enough to be going on. If you need anything else, please let me know. Not a GD technorati so a bit stumped.
[edit]
This is running PHP web internal server (php -S localhost:8000). The PHP is a Phpbrew variant.

from captcha.

chookg avatar chookg commented on June 6, 2024

+1

from captcha.

Gregwar avatar Gregwar commented on June 6, 2024

Should be fixed on master, do you confirm it is ok?

from captcha.

chippyash avatar chippyash commented on June 6, 2024

Did you tag it yet so it'll be pulled through in dependencies?

from captcha.

Gregwar avatar Gregwar commented on June 6, 2024

Just tagged v1.1.2

from captcha.

chippyash avatar chippyash commented on June 6, 2024

ok - you'll need to bump up your formidable lib to 1.1.1. It currently specifies "gregwar/captcha": "1.0.*", in requires. Could go to "~1.1', that way, it'll pick up any new features in captcha.

from captcha.

Gregwar avatar Gregwar commented on June 6, 2024

Bumped

from captcha.

chippyash avatar chippyash commented on June 6, 2024

OK - still no joy. I think it is to do with lack of freetype support.
see http://stackoverflow.com/questions/7290958/php-fatal-error-call-to-undefined-function-imagettftext
I'll take a look later to see what is missing in my GD mod build.
Certainly, your commit will remove any ambiguity.

from captcha.

chippyash avatar chippyash commented on June 6, 2024

I cannot get gd installed with freetype support. Something weird happening with package dependencies in PHP 7.0 and Ubuntu 16.04. This is the root of the problem. The ubuntu package installer will not install Freetype. Not your code. So I think you may close this issue.

from captcha.

Charlyo avatar Charlyo commented on June 6, 2024

I don't know if that's you case: https://stackoverflow.com/questions/26493762/yosemite-el-capitan-php-gd-mcrypt-installation

In macOS, treetype is not installed by default.

from captcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.