开发者

Zend Captcha makes request take long to load

Recently, I migrated my Zend framework project to another computer.

When I load an specific action on browser, it takes about 10 seconds to finish. After that, I only see the associated view script. The layout is not displayed. Other actions load just fine. This action has a form and, also, loads jQuery library.

There are no error messages anywhere (browser, logs).

I searched Apache/PHP configuration but I did not find anything relevant.

开发者_开发问答

Any clue?

EDIT:

I found out that the problem comes from Zend_Form_Element_Captcha. Commenting its declaration at the form's init method, everything works fine.

EDIT:

I finally found the source of the problem. I digged into ZF code and found @iconv_strlen inside Zend_Text_Figlet's render method which was lasting forever (and also did not display any errors).

After that, I searched in my php.ini configuration files to see differences related to iconv between the one that works and the one that doesn't. The only difference is a configure command. The one that does not work has: --with-iconv-dir=/Applications/MAMP/Library

After that, I found an useful post here at stackoverflow that explained it all. It turns out that MAMP (PHP version 5.3) has a related bug. So, my solution is downgrade to MAMP with PHP version 5.2

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜