Yii Framework Forum: can't see Captcha image - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

can't see Captcha image Rate Topic: -----

#21 User is offline   zama janan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 22-July 10
  • Location:Canada

Posted 02 August 2010 - 09:32 PM

View Postzama janan, on 01 August 2010 - 04:52 PM, said:

Hi guys,

I do have a same problem and did follow all above step by step codes and still having same problem.

I also have this ....blogdemo-enhanced application installed and it shows image on that form and I did compare word by word in all ...Model..Controller..Views but still image doesn't show up on my another application Comment Form.

But there is one thing on my blog application Contact form the image shows up but on Comment Form doesn't.

I spend the whole day to find it out but finally give up...:)

Any other reason where I'm missing some thing.

An early reply will be appreciated.



Hi guys,

Finally I just did figure out why Captcha image doesn't show up on my comment form as I did follow step by step code in Controller, Modell and View.

The problem I found out in urlManager'=>array(...) in main.php file I just disable the entire block and wola it works then I manage my URL the way I want and then enable urlManager'=>array(...) and now every things working fine.

So make it sure that your URL are ok as still I didn't gone through in deep in this problem as why it happened so make also sure the above post solution as it also caused by with some guys.

Good luck :)
0

#22 User is offline   jsydseter 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 05-May 10
  • Location:Berlin

Posted 17 August 2010 - 07:49 AM

Hello. I have the same problem. I have tried all solutions presented here. I use Unicode (UTF-8, no BOM) I have also zaped Gremlins just in case there could be any ASCII in there, but I didn't find any. I also have tried to change the encoding scheme from ASCII to UTF 8 and back. with and without boom (original encoding was UTF-8, no boom). The blog application that follows the yii installation has a captcha that works and when i move the demo Blog to my webserver it works with captcha out of the box, but not from the same webserver on my new site.

I get this message in firefox when trying to call captcha alone from the site controller:

Posted Image

The gd library is installed with TTF support:

Posted Image

I get no errors in the log or when calling tail -f /var/log/apache2/error_log .

Any help would be appreciated.
------------------------------------------------------
Make the impossible possible by doing what is possible

www.sydseter.com
0

#23 User is offline   jsydseter 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 05-May 10
  • Location:Berlin

Posted 18 August 2010 - 03:30 AM

I solved it. I must have been editing the index.php file with another editor. In the end it was a line break that I added in the index file between…

$yii=dirname(__FILE__).'/../../yii/framework/yii.php';

and…

$config=dirname(__FILE__).'/protected/config/main.php';

Such a subtle and invisible mistake. I am not sure if it is due to a change between ASCII and UTF8 or the change from Windows oriented line breaks to Unix, but I think it was the editor. I have been changing editors during the last weeks so that might explain it.

Be careful about the text encoding boys and girls.
------------------------------------------------------
Make the impossible possible by doing what is possible

www.sydseter.com
0

#24 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 18 August 2010 - 03:45 AM

So many people have different kinds of problems with captcha that we can create a special topic in the guide (or better cookbook page) about this :D
0

#25 User is offline   sherifSakr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-October 12

Posted 14 October 2012 - 09:54 AM

I have bad experience with cpatacha image before but I found the solution around many issues depend on your settings but the

first and big reason which affect capatcha image is the encoding of index.php for intro run page , main.php in config folder you should encode it with utf-8 with out BOM , I used notepad++ to did that .

second reason : the access rules . but when I CHECK other demos test i did not find any related access rules with capatcha .
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users