Recently all my captcha images become invalid - they are broken some how.
I checked what’s wrong and found a UTF-8 Byte order Mark prepended in each of them.
I rechecked my files and found that I messed up /config/main.php somehow - found BOM in it.
I cleared it, but problem still persists!
I started to look through all files and found that many files are BOM’ed even in Yii framework folder. Althow they seem irrelevant to this problem, I think this should be fixed.
And I still did not find a solution to my problem. Please help.
[UPDATE] - I found BOM inside one of my php files and fixed this problem.
But, files with BOM are there mainly in ru nl and zn localization folders in Yii framework itself!
Actually I use Netbeans IDE for my php editing needs. But - for quick editing of config/main.php I used some windows notepad replacement (just once) and the rest you know…
I too had the same problem. As I have used multiple editors that would be the reason for BOM addition in files. Now I have converted the files to ‘UTF-8 without BOM’ using Notepad++ And It fixed the Problem for Yii Broken Captcha Image.
If anyone want to convert all the files recursively(without BOM) then please refer this link.