會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

User Forum » Another Captcha does not work issue

發表人: paulhr
8 年 前
Another Captcha does not work issue

Fedora 23

Tomee 1.7.4 (Tomcat 7.0.6smilie

java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

============================================================

../bin/setenv.sh
Added a setenv.sh with the following to the Tomcat bin directroy.
JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Xms128m -Xmx1024m -XX:MaxPermSize=256m -server"
echo "JAVA_OPTS=" ${JAVA_OPTS}

============================================================

.../WEB-INF/config/jforum-custom.conf

avatar.maxHeight=130
avatar.maxWidth=130
avatarMaxKbSize=25
captcha.registration=true
container.app=Apache Tomcat (TomEE)
container.version=7

============================================================

.../WEB-INF/config/SystemGlobals.properties

# ########
# Captcha
# ########
captcha.registration = true
captcha.posts = true
captcha.ignore.case = true

captcha.width = 250
captcha.height = 75

captcha.min.words = 4
captcha.max.words = 6

captcha.min.font.size = 25
captcha.max.font.size = 35


============================================================
.../logs/catalina.out

{Basically nothing}
Aug 10, 2016 9:29:54 AM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Deployed Application(path=/opt/tomee/webapps/host-manager)
Aug 10, 2016 9:29:54 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/tomee/webapps/host-manager has finished in 294 ms
Aug 10, 2016 9:29:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 10, 2016 9:29:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8443"]
Aug 10, 2016 9:29:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 10, 2016 9:29:54 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 84921 ms

============================================================
At the registration page.



[Thumb - Snap2.png]
檔案名稱 Snap2.png
描述 沒有檔案註解存在
檔案大小 33 Kbytes
下載次數 34597 次
[Disk] 下載


發表人: udittmer
8 年 前
The SourceForge file area has a replacement captcha library called jcaptcha-1.0.jar; that is especially compiled for non-Oracle JVMs. Try using that instead of the one that comes in the war file.

發表人: paulhr
8 年 前
I uploaded the jcaptcha-1.0.jar to the Tomcat bin/ directory. Changed owner, group and permission to agree with other JARs in the directory. Restart Tomcat and Restarted the OS. Same issue.

發表人: paulhr
8 年 前
The following entries were added to logging.properties with no effect. The Tomcat logs say nothing about Captcha.

com.octo.captcha.text.level = FINE
com.octo.captcha.sound.level = FINE
com.octo.captcha.service.level = FINE
com.octo.captcha.module.level = FINE
com.octo.captcha.image.level = FINE
com.octo.captcha.engine.level = FINE
com.octo.captcha.component.level = FINE

發表人: udittmer
8 年 前
 
paulhr wrote:I uploaded the jcaptcha-1.0.jar to the Tomcat bin/ directory.

Unless you also removed the file of the same name from the WEB-INF/lib directory, this file would be ignored. Web apps running in Tomcat load classes first from WEB-INF/lib and WEB-INF/classes, and only then from Tomcat's classpath. And no web app has access to classes from Tomcat's "bin" directory, only its "lib" directory.

發表人: paulhr
8 年 前
moved jcaptcha-1.0.jar to .../webapps/jforum/WEB-INF/lib/jcaptcha-1.0.jar and recycled Tomcat. No effect.

發表人: udittmer
8 年 前
Odd. Is a jforum.log file being created in the logs directory? That's where all the JForum-related logging would be directed.

發表人: paulhr
8 年 前
The log was found in /tmp. See attached. There are Java exceptions.

檔案名稱 jforum.log
描述 jforum.log found in /tmp
檔案大小 90 Kbytes
下載次數 35699 次
[Disk] 下載


發表人: udittmer
8 年 前
I've never seen that ("word is too tall: try to use less letters, smaller font or bigger background"). The default captcha settings should work out of the box, but do a sanity check (and possibly fiddle around with) the captcha settings on the Admin Control panel -> Configurations page.

I see the earlier exceptions from using the wrong jcaptcha library are gone now, so that's progress.

發表人: paulhr
8 年 前
Turning Captcha off then on seemed to fixed the issue. A restart of the Tomcat server was not needed. I have added three new tests ids using Captcha.




會員註冊 / 登入  |  電腦版  |  Jump to top of page