CCaptcha displaying no image yii

心已入冬 提交于 2019-11-29 14:14:59

The problem was with the controller file,it should have been,

public function accessRules()
    {
        return array(
            array('allow', 
                'actions'=>array('create', 'captcha'),
                'users'=>array('*'),
            ),
    } 


whereas I had mentioned the action for captcha at the end, which I figured out is not allowed in Yii. All the allow actions for * should be together.

Manh

Yii captcha will create a png image. A possible explanation for the broken image link would be a missing GD extension or imagick extension, which can be identified by the presence of the following text in your error.log:

call to undefined function imagecreatetruecolor

For details and fix see "call to undefined function imagecreatetruecolor" error in PHP & pChart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!