Hi all, first sorry for my english.
I have a problem with captcha validation form. In localhost work fine but in my godaddy shared hosting not work, the image returned it has errors and for this reasons not show.
Best regards.
Hi all, first sorry for my english.
I have a problem with captcha validation form. In localhost work fine but in my godaddy shared hosting not work, the image returned it has errors and for this reasons not show.
Best regards.
What error? Can you describe the issue more precisely?
Thanks for your answer.
That is precisely the problem, supposedly everything is working ok and no error in execution. When the image is generated (www.mysite.xx/site/captcha?v=5719a80755345) the response code is 200, but when I try to show the image is not displayed because this was generated with errors.
On the localhost works perfect.
Just check if GD extension is available in your godaddy server.
When you look at the raw response of www.mysite.xx/site/captcha?v=5719a80755345 in a program like Fiddler, does it look like an image file? I.e. does it have the headers you would expect from an image file?
The headers are well and are the same as set out in the class CaptchaAction (vendor/yiisoft/yii2/captcha/CaptchaAction.php) class. In the image header being returned is.
The GD extension is enabled. I tried the imagick extension and the result is the same.
So in Fiddler it looks like a valid image file, but your browser claims it is not a valid file?
Check if the response starts with a linebreak.
Sorry I don’t understand. How can I check if the response starts with a linebreak?
You can look at the raw response in Fiddler.
I had a similar problem where my response body started with a linebreak character instead of "PNG".
It was caused by a config include file that had an empty line before the opening <?php tag.