Open jabberdquestions opened 4 months ago
Where is your script saving the captcha?
I was just directly outputing the binary image. But after reviewing more carefully the default captcha I see that conver/ImageMagick is using a pseudo-filename pipping the output using a standard stream STDOUT. I have modified my script as it follows:
imagestring($this->image, 5, 3, 0, $this->text, $color);
fwrite(STDOUT, imagepng($this->image));
But I still have the same output in the logs
I have replaced the default script with a custom one but it is not working for now. Right now I am trying to replace the current script with one developed in PHP, this script takes the random number generated as argument, create a captcha based on that value and output a binary image as content
In my ejabberd configuration I have specified to use a different script in this way:
And this is how I am producing the binary image:
If I execute the script directly from the terminal like this
php -f /usr/share/ejabberd/mycaptcha.php 123456 > test.png
The captcha is generated properlyBut when I restart ejabberd is not working and I am getting the following output in the logs:
Am I missing something? Thanks