错误: Could not read CAPTCHA token file.There is a problem with the directory /si-captcha-for-wordpress/captcha/temp/.The directory is not found, a permissions problem may have prevented this directory from being created.

在自己的wordpress博客上安装了“si-captcha-for-wordpress”,并在该插件设置中设置了登录需要验证码,然后我自己退出后再尝试登录,结果发现怎么输入验证码都显示如下的错误:错误: Could not read CAPTCHA token file.There is a problem with the directory /si-captcha-for-wordpress/captcha/temp/.The directory is not found, a permissions problem may have prevented this directory from being created. Fixing the actual problem is recommended, but you can uncheck this setting on the si captcha options page: “Use CAPTCHA without PHP session” and the captcha will work this way just fine (as long as PHP sessions are working).

我自己把代码checkout出来,先尝试在/si-captcha-for-wordpress/captcha目录下添加了temp目录,commit以后,还是登录不进去,并且报一个有关权限的错误,但是sinaapp根本就不能设置访问权限的,所以基本判断,这个插件还是存在一定的兼容性问题。

最后没招了,只能把代码中的wp-contentplugins目录下的si-captcha-for-wordpress文件夹删除,删除后commit代码,然后尝试登录博客,登录成功,在控制台中进入插件管理界面,提示si-captcha-for-wordpress插件已经被禁用,但是找不到si-captcha-for-wordpress插件目录。

为了保证博客程序运行不要老是抛错,既然si-captcha-for-wordpress已经被禁用了,我于是又在代码中把si-captcha-for-wordpress目录还原了,再登录博客进入控制台,删除这个插件,就正常了。

后来我发现了一个验证码的插件,很不错的,推荐一下:Captcha plugin,我现在用的就是这个。

Post Footer automatically generated by wp-posturl plugin for wordpress.