dereuromark / cakephp-captcha

Dead simple, unobtrusive and extendable captcha solution for CakePHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Captcha image is not displayed

calcosta opened this issue · comments

commented

CakePHP Version: 3.8.8
PHP Version: 7.3.12

The captcha image is not displayed.

This can be fixed by changing
line 5 in src/Template/Captcha/display.ctp
echo $captcha->image;
to echo stream_get_contents($captcha->image);

Any idea why this happens? Without the stream_get_contents function the output is only "Ressource id #xx" instead of the binary png data.

Can you make a PR here?
I am not sure why I dont face this issue locally or on the demo sandbox server.

commented

Yeah I'm just checking if it is a local issue since it works fine on our production server.
Strange thing is that it stopped working on production some days ago, now works again.

I'll just close the ticket, check if it's only a local issue and reopen it again if not.
Thanks for your help!