Captcha Always Wrong

Even in the default application (which is generated by .../framework/yiic webapp newappname), contact page, captcha always fails validation.

I stumbled over this in my custom app, but to test it cleanly I downloaded fresh Yii (1.1.14), created default webapp and the problem is there also.

I read that people have issues with this using ajax validation, so tied disabling it, but problem was still there.

Please suggest how to debug this, at least what to look at.

Can you successfully log in to the new web app and remain logged in as you click around? If not, it might be a cookie issue.

If I mark "Remember me next time", then I stay logged in while clicking on links.

If I don’t mark “Remember me next time”, seems like it doesn’t login at all.

Is it supposed to behave this way?

No, you should remain logged in until you close your browser (or when you’re inactive for a certain amount of time).

It sounds like a problem with your sessions in PHP rather than cookies. Look into that first.

Thanks Keith!

Problem has been solved by adding this to config:


...

 'components' => array(

        'session' => array(

            'autoStart' => true,

            'sessionName' => 'session',

            'savePath' => '/tmp', // this is the default, but still needs to be explicitly set

            'timeout' => 1440

        ),