edk
(Edwardkoo)
April 18, 2013, 7:12am
1
Hi i have these UrlManager settings
'class'=>'application.components.UrlManager',
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array
(
'<language:(en|zh)>/' => 'site/index',
'<language:(en|zh)>/<action:(contact|login|logout)>/*' => 'site/<action>',
'<language:(en|zh)>/<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<language:(en|zh)>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<language:(en|zh)>/<controller:\w+>/<action:\w+>/*'=>'<controller>/<action>',
Captcha is not displaying for me and i found that originally the captcha url is
localhost/index.php?r=site/captcha&v=516f9a0fa72c0
now it changed to
localhost/en/captcha/v/516f9a0fa72c0
How could i solve the problem?
Thanks.
andy_s
(Arekandrei)
April 20, 2013, 10:34pm
2
localhost/en/captcha/v/516f9a0fa72c0 <- Does this "page" work if you open it manually? What is the error?
You can also try to add a rule (in the begining): ‘captcha’=>‘site/captcha’
alirz23
(Alirz23)
April 21, 2013, 12:48pm
3
Hi there
this should solve your problem
'class'=>'application.components.UrlManager',
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array
(
'<language:(en|zh)>/' => 'site/index',
'<language:(en|zh)>/<action:(contact|login|logout|captcha)>/*' => 'site/<action>', // you can add the captcha action in here
'<language:(en|zh)>/<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<language:(en|zh)>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<language:(en|zh)>/<controller:\w+>/<action:\w+>/*'=>'<controller>/<action>',
edk
(Edwardkoo)
April 24, 2013, 6:10am
4
Ok actually the url is
localhost/en/site/captcha/v/517770f04f484
If i open it manually in browser it will just show an empty image.
Tried added ‘captcha’=>‘site/captcha’ and the url changed to
localhost/captcha?v=5177763bacdb5&language=en
Still not working.
Then i try added ‘<language:(en|zh)>/captcha’=>‘site/captcha’ and url changed to
localhost/en/captcha?v=517776b26cbdd
Not working too.
Where does the captcha image being generated/stored? I want to check if the image actually exists or not.
edk
(Edwardkoo)
April 24, 2013, 6:13am
5
alirz23:
Hi there
this should solve your problem
'class'=>'application.components.UrlManager',
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array
(
'<language:(en|zh)>/' => 'site/index',
'<language:(en|zh)>/<action:(contact|login|logout|captcha)>/*' => 'site/<action>', // you can add the captcha action in here
'<language:(en|zh)>/<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<language:(en|zh)>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<language:(en|zh)>/<controller:\w+>/<action:\w+>/*'=>'<controller>/<action>',
Hi alirz, i try added
‘<language:(en|zh)>/<action:(contact|login|logout|captcha)>/*’ => ‘site/<action>’,
and the captcha url changed to
localhost/en/captcha/v/517777b17076f
and it’s not working too.
alirz23
(Alirz23)
April 24, 2013, 10:44am
6
how about your login and contact page, are they working fine, its weird and also remove the asterisk in the end
‘<language:(en|zh)>/<action:(contact|login|logout|captcha)>’ => ‘site/<action>’,
edk
(Edwardkoo)
April 25, 2013, 7:28am
7
alirz23:
how about your login and contact page, are they working fine, its weird and also remove the asterisk in the end
‘<language:(en|zh)>/<action:(contact|login|logout|captcha)>’ => ‘site/<action>’,
Contact login logout all working good. Actually the captcha is applied at contact page.
Anyway, i tried both
‘<language:(en|zh)>/<action:(contact|login|logout|captcha)>’ => ‘site/<action>’,
and
‘<language:(en|zh)>/<action:(login|logout|captcha)>’ => ‘site/<action>’,
it’s still not working, just show empty image. I really need to know where’s the image actually being generated and saved to? Temp file or memory?