留言板

FIXED - captcha not showing in create account 6.04

thumbnail
Hamish Campbell,修改在13 年前。

FIXED - captcha not showing in create account 6.04

Junior Member 帖子: 87 加入日期: 08-8-20 最近的帖子
Running 6.04 tomcat bundle on Ubuntu sever 8.4

Users cant create accounts as the captcha doesn't show up, works fine in 6.03

can see it here on our hope to be soon production server http://visionontv.com:8080

Hamish
thumbnail
Samuel Liu,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Expert 帖子: 301 加入日期: 10-5-27 最近的帖子
Hi Hamish,

Thanks for the info, I'll try to reproduce this asap. I'll let you know how it goes emoticon

Warm regards,
Sam
thumbnail
Samuel Liu,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Expert 帖子: 301 加入日期: 10-5-27 最近的帖子
Hi Hamish,

So basically we didn't change any code relating to the captcha in the new version. Out of curiosity, did you set a variable somewhere called java.awt.headless, because Ubuntu Server is a headless OS?

Warm regards,
Sam
thumbnail
Samuel Liu,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Expert 帖子: 301 加入日期: 10-5-27 最近的帖子
Hi Hamish,

Here are all the possible Captcha settings that you can specify in portal-ext.properties. Perhaps you should try enabling recaptcha's captcha service? (http://www.recaptcha.net) -- if ours doesn't work for you maybe theirs will. I'm still unable to reproduce the bug right now.


##
## Captcha
##

    #
    # Set the maximum number of captcha checks per portlet session. Set this
    # value to 0 to always check. Set this value to a number less than 0 to
    # never check. Unauthenticated users will always be checked on every request
    # if captcha checks is enabled.
    #
    captcha.max.challenges=1

    #
    # Set whether or not to use captcha checks for the following actions.
    #
    captcha.check.portal.create_account=true
    captcha.check.portal.send_password=true
    captcha.check.portlet.message_boards.edit_category=false
    captcha.check.portlet.message_boards.edit_message=false

    #
    # Set the engine used to generate captchas. reCAPTCHA uses an external
    # service that must be configured independently but provides an audible
    # alternative which makes the captcha accessible to the visually impaired.
    #
    #captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl
    captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaImpl

    #
    # reCAPTCHA
    #
    captcha.engine.recaptcha.key.private=
    captcha.engine.recaptcha.key.public=
    captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
    captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=
    captcha.engine.recaptcha.url.verify=http://api-verify.recaptcha.net/verify

    #
    # SimpleCaptcha
    #

    #
    # Set the height and width for captcha images generated by SimpleCaptcha.
    #
    captcha.engine.simplecaptcha.height=50
    captcha.engine.simplecaptcha.width=150

    #
    # Input a list of comma delimited class names that implement
    # nl.captcha.backgrounds.BackgroundProducer. These classes will be randomly
    # used by SimpleCaptcha to generate a background for a captcha image.
    #
    captcha.engine.simplecaptcha.background.producers=nl.captcha.backgrounds.FlatColorBackgroundProducer,nl.captcha.backgrounds.GradiatedBackgroundProducer,nl.captcha.backgrounds.SquigglesBackgroundProducer,nl.captcha.backgrounds.TransparentBackgroundProducer

    #
    # Input a list of comma delimited class names that implement
    # nl.captcha.gimpy.GimpyRenderer. These classes will be randomly
    # used by SimpleCaptcha to gimp a captcha image.
    #
    #captcha.engine.simplecaptcha.gimpy.renderers=nl.captcha.gimpy.RippleGimpyRenderer
    captcha.engine.simplecaptcha.gimpy.renderers=nl.captcha.gimpy.BlockGimpyRenderer,nl.captcha.gimpy.DropShadowGimpyRenderer,nl.captcha.gimpy.FishEyeGimpyRenderer,nl.captcha.gimpy.RippleGimpyRenderer,nl.captcha.gimpy.ShearGimpyRenderer

    #
    # Input a list of comma delimited class names that implement
    # nl.captcha.noise.NoiseProducer. These classes will be randomly
    # used by SimpleCaptcha to add noise to a captcha image.
    #
    #captcha.engine.simplecaptcha.noise.producers=nl.captcha.noise.CurvedLineNoiseProducer
    captcha.engine.simplecaptcha.noise.producers=nl.captcha.noise.CurvedLineNoiseProducer,nl.captcha.noise.StraightLineNoiseProducer

    #
    # Input a list of comma delimited class names that implement
    # nl.captcha.text.producer.TextProducer. These classes will be randomly
    # used by SimpleCaptcha to generate text for a captcha image.
    #
    captcha.engine.simplecaptcha.text.producers=com.liferay.portal.captcha.simplecaptcha.PinNumberTextProducer
    #captcha.engine.simplecaptcha.text.producers=com.liferay.portal.captcha.simplecaptcha.DictionaryWordTextProducer,com.liferay.portal.captcha.simplecaptcha.PinNumberTextProducer,nl.captcha.text.producer.DefaultTextProducer,nl.captcha.text.producer.FiveLetterFirstNameTextProducer

    #
    # Input a list of comma delimited class names that implement
    # nl.captcha.text.renderer .WordRenderer. These classes will be randomly
    # used by SimpleCaptcha to render text for a captcha image.
    #
    captcha.engine.simplecaptcha.word.renderers=nl.captcha.text.renderer.DefaultWordRenderer
    #captcha.engine.simplecaptcha.word.renderers=nl.captcha.text.renderer.ColoredEdgesWordRenderer,nl.captcha.text.renderer.DefaultWordRenderer


To use this, copy any properties you think you want to change (what you see here is default) and modify them as willed in your portal-ext.properties, which you probably have created already. If not, it's in tomcat-{version}/webapps/ROOT/WEB-INF/classes/portal-ext.properties

In fact, I'd recommend using recaptcha. It's a really great service and to activate it just add this to your portal-ext.properties (you need to get your own public/private key though)


##
# Enable or not reCaptcha
##

captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl
#captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaI

captcha.check.portal.create_account=true
captcha.check.portal.send_password=true
captcha.check.portlet.message_boards.edit_category=false
captcha.check.portlet.message_boards.edit_message=false

##
# Urls to access reCaptcha services
##
captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=
captcha.engine.recaptcha.url.verify=http://api-verify.recaptcha.net/verify

##
#reCaptcha domain specific keys
##
captcha.engine.recaptcha.key.private=YOUR KEY HERE. GET IT FROM http://www.google.com/recaptcha
captcha.engine.recaptcha.key.public=YOUR KEY HERE. GET IT FROM http://www.google.com/recaptcha



Hope this helps emoticon Keep asking if you have more problems, I will do my best to assist you.

Warm regards,
Sam
thumbnail
Hamish Campbell,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Junior Member 帖子: 87 加入日期: 08-8-20 最近的帖子
Thanks Sam, looking into it now.

One thing we did which might affect it, we installed a new copy of Liferay 6.04 on our server and imported the database from our 6.03 build, we also downgraded our operating system form Ubuntu server 10.04 to 8.04 in the move.
Steve Dowding,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

New Member 帖子: 2 加入日期: 10-7-28 最近的帖子
Samuel Liu:
Hi Hamish,

So basically we didn't change any code relating to the captcha in the new version. Out of curiosity, did you set a variable somewhere called java.awt.headless, because Ubuntu Server is a headless OS?

Warm regards,
Sam


Hi Sam,

I'm part of VisionOn.tv and did the server setup. First thing to say is I'm no expert.

All I did with java was: sudo apt-get install openjdk-6-jre
As java runtime installed it reported it was installing 'headless', we did no other configuration of java.

We'll probably want to try with recaptcha for better accessibilty. I read somewhere Recaptcha is enabled in liferay 6? What wasn't clear to me was whether we needed to create an account with recaptcha.net or if it somehow functions 'out-of-the-box' as part of Liferay? You've answered that for us already, so we'll sign ourselves up for a key.

Thanks
thumbnail
Samuel Liu,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Expert 帖子: 301 加入日期: 10-5-27 最近的帖子
Hi Steve,

Yeah I would think it installed as headless if you used apt to get it. Hrm, yes Recaptcha is plugged in out of the box, so go ahead and add those properties to your portal-ext with your keys. Hopefully this will solve your problem.

Alternatively you can also disable captcha, though I doubt that's optimal.

A part of me wonders if SimpleCaptcha's failure to render a captcha might have to do with the fact that Ubuntu server doesn't come with graphical utilities. There may be an unaccounted for dependency -- I can do a test on this but it will take some time. Until then your best bet is Recaptcha I think. (I also prefer recaptcha -- the captchas tend to be clearer and it's Google technology so it's rock-solid).

Let me know how it goes!

Warm regards,
Sam
thumbnail
Hamish Campbell,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Junior Member 帖子: 87 加入日期: 08-8-20 最近的帖子
Sam, thanks for the excellent help, Steve got Recaptcha up and running which has solved the problem. emoticon

Hamish
thumbnail
Samuel Liu,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04

Expert 帖子: 301 加入日期: 10-5-27 最近的帖子
Glad to assist you Hamish!

Sam
thumbnail
Tina Fasulo,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04H

New Member 帖子: 7 加入日期: 10-4-25 最近的帖子
Hi,
I have the same problem in Liferay 5.2.3. On my pc, which runs on Ubuntu 10.04 with GUIs, captcha was showed. When I installed it on a server, which runs on Ubuntu server 10.04 LTS, in command-line modality, the captcha stopped to work.

Do you think this problem is due to "headless"? Do I have to install further libraries, like java.awt.headless?

Thank you!

Furthermore, is there a mechanism to use recaptcha service in Liferay 5.2.3 or a way to integrate it?

Bye

Tina
thumbnail
James Falkner,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04H

Liferay Legend 帖子: 1399 加入日期: 10-9-17 最近的帖子
I don't know if this will work but in the past on headless systems one had to set -Djava.awt.headless=true on the JVM command line (or through code) to keep the graphics subsystems from throwing exceptions when GUI libraries weren't present.
satish M,修改在13 年前。

RE: UPDATED - captcha not showing in create account 6.04H

New Member 帖子: 23 加入日期: 10-12-1 最近的帖子
Hi Tina,

I am also facing the same problem. In my local meshine captch is showing properly,
but in server it is not showing.
I am using liferay 5.1.2 with tomcat 6.0
Have you solved your problem, if it solved can you share with me how you solved.

Thanks,
Satish.
thumbnail
Olaf Kock,修改在8 年前。

RE: FIXED - captcha not showing in create account 6.04

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
As this thread seems to stay on top in the "Recent Changes" I'll add some explanation: I've split an unrelated new question (that resurrected this thread) into its own thread. Please continue there - back to sleep for this old thread.
Ankita Gupta,修改在4 年前。

RE: FIXED - captcha not showing in create account 6.04

New Member 发布: 1 加入日期: 18-3-29 最近的帖子
Hi steve,

I am unable to run recaptcha on Liferay 6.2.

Getting error.
13:50:47,274 ERROR [http-bio-2020-exec-1][ReCaptchaImpl:105] java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
    at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1411)
    at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1038)
    at com.liferay.portal.util.HttpImpl.URLtoString(HttpImpl.java:1069)
    at com.liferay.portal.kernel.util.HttpUtil.URLtoString(HttpUtil.java:395)
    at com.liferay.portal.captcha.recaptcha.ReCaptchaImpl.validateChallenge(ReCaptchaImpl.java:102)
    at com.liferay.portal.captcha.recaptcha.ReCaptchaImpl.validateChallenge(ReCaptchaImpl.java:139)
    at com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaImpl.check(SimpleCaptchaImpl.java:88)
    at com.liferay.portal.captcha.CaptchaImpl.check(CaptchaImpl.java:55)
    at com.liferay.portal.kernel.captcha.CaptchaUtil.check(CaptchaUtil.java:42)

even if configured portalext properties:
​​​​​​​##
# Enable or not reCaptcha
##
#recaptcha.enabled=true

captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl
#captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaI

captcha.check.portal.create_account=true
captcha.check.portal.send_password=true
captcha.check.portlet.message_boards.edit_category=false
captcha.check.portlet.message_boards.edit_message=false

##
# Urls to access reCaptcha services
##
captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=
captcha.engine.recaptcha.url.verify=https://www.google.com/recaptcha/api/siteverify

##
#reCaptcha domain specific keys
##
captcha.engine.recaptcha.key.private=6LcTuqAUAAAAAJ8dgf_W9EyCL7hWJVpwzXmmRU8b
]
captcha.engine.recaptcha.key.public=LcTuqAUAAAAAIVTzOmpcgvIFJG_0lZHcrKBOMkr]