Jump to content

noCaptcha reCaptcha for phpVMS


alblua

Recommended Posts

Hello all,

For those of you who know, Google has released a new version of the reCaptcha that doesn't have a Captcha: noCaptcha reCaptcha. Some more information can be found at http://www.google.co...ntro/index.html.

Now, I've figured out (kind of) on how to implement it (very easy change), so I'm hoping it's backwards compatible. If anyone is willing to give it a try, please try my code snippet. My development copy of phpVMS isn't working as I want it to due to the skin, and I'm too lazy to go into the admin panel to change the skin to crystal.

recaptchalib.php is attached, to install, go to (phpVMS isntall directory)\core\lib\recaptcha. Make sure to backup your old one! I'm not being held liable here. You were warned. :)

Thank you for anyone who tries, let me know how it goes.

-Albert Lua

recaptchalib.php

Link to comment
Share on other sites

Just a small issue, this part:

<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>

Removing allows me to see the registration page, but adding it back makes it dead (PHP kills the process), so I end up with a blank page.

Is it okay to take out, or should I got to 5.5? I tried going up, but looks like everything is changed so much that I can't quite do it without screwing up my current skin in progress.

Link to comment
Share on other sites

  • Administrators

Noob question here !

Where do I actually add the two keys that we get from Google's recaptcha in PHPVMS 5.5 ?

Just copy the lines from the app.config.php file and place them in your local.config.php file then update your keys.

/* Keys for recaptcha, you can change these if you want to your own but it's a global key so it should just work */
Config::Set('RECAPTCHA_PUBLIC_KEY', '6LcklAsAAAAAAJqmghmMPOACeJrAxW3sJulSboxx');
Config::Set('RECAPTCHA_PRIVATE_KEY', '6LcklAsAAAAAAMeQy5ZBoDu8JOMTP-UL7ek1GedO');

Link to comment
Share on other sites

I can switch back to the default way if there is no workaround.

UPDATE: It doesn't actually work after moving it back to its normal place. Im going to look into it a bit more and update you back.

UPDATE: I reinstalled phpVMS 5.5x and it seems to work now ! Probably had outdated or corrupt files.

Thank you for your help and time.

Edited by MikeTGV
Link to comment
Share on other sites

  • 2 months later...

I updated my extended version registration and contact forms to this today. You can take a look at how it is done here -> https://github.com/D...45be818e948d96c

David,

I copied the files from your github and saved them in phpvms but now I have broken things. I suspect I did not copy things across properly. Is there a way I can download the amended files as a zip or something so I don't stuff up the copy and paste.

Thanks

Link to comment
Share on other sites

Thanks AirbusAi342, my install is fresh. Apart from the skin this is the first thing I've tried doing.

I am pretty sure I have either missed out a ; or ?>, something like that but the files are in all sorts of colours and I can't quite tell if I've copied it all perfectly. I was just hoping David might be able, or someone, whizz me there files so I know they are correct. :)

Link to comment
Share on other sites

Ok so I worked out partly what I did wrong. I copied the code direct from the view window which copied a load of additional characters. Having cleared those out the code still shows me a number of errors which I don;t know how to fix. Is there another way round this captcha issue because at the moment no pilots can register and I need to sort it.

Anyone else found an easier way to fix it?

Link to comment
Share on other sites

@t_bergman - next time post sooner!!! You'd have saved me sooooo much wasted time! :P Just kiddin. Your response in one of my other posts was a great help. Fortunately I had backed up all the files I had changed so I just deleted the modified files and restored the old ones. Then I got myself a new captcha key from Google, entered it into the local.config.php and it's all working perfectly.

Thanks again for the support and responses :D

Link to comment
Share on other sites

  • 1 year later...
  • Moderators

You can go to google and register your own set of keys if needed, the url changed a while ago for captcha the settings are in the config file but if you do change them place it in your local config file.

Existing keys should look like,

/* Keys for recaptcha, you can change these if you want to your own but it's
a global key so it should just work */
Config::Set('RECAPTCHA_PUBLIC_KEY', '6LcklAsAAAAAAJqmghmMPOACeJrAxW3sJulSboxx');
Config::Set('RECAPTCHA_PRIVATE_KEY', '6LcklAsAAAAAAMeQy5ZBoDu8JOMTP-UL7ek1GedO');

Link to comment
Share on other sites

  • 11 months later...

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/oneworl1/public_html/core/lib/recaptcha/recaptchalib.php on line 93

Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6LcbnwoUAAAAAMIr-2qxPKs2P1uW6Ii9OZGMlAw9&remoteip=187.244.42.78&v=php_1.0&response=03AIezHSZVR8ikYR7dCkpjPazR4Ym5d0BsYwlL3ji4bbLH8LXPEjh4agigGZuOBseyMM_LEBlpcFhr8Gib3iPPrgGEazcgaRrzt2kEef58Vbd5ucey5f9uTSBI6y4Mx2fWsAwIRg7WhY3bFYFjgWTeWeC3Q0rbLOitydtMsWwSFoDkXz6te0Ay_-_FbqQkl5K2NMGsFj9_tEgPaenvwGb1Apf4wVD1ywNs0-24pkD8b4WqL2i15x1CHgbiyH9HVn1kBnw-zDw7D8jpA4l7ALOFiMiFPBcVVTmHUsz5UfOX4E-O5uzx-R0ot_JwX34hOudktH9ydm9x0cqO4U1qAckRX396C9PY6gsm_iS4BGLb9PUueUiNS7WKCWLh68oETX5FbMYLUOdPYQdrfBVW3XMw5ulHvSLkRVxqhQ): failed to open stream: no suitable wrapper could be found in /home/oneworl1/public_html/core/lib/recaptcha/recaptchalib.php on line 93

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

This is what comes out in my registration form, I tried everything I have suggested in the forum, the installation is new but I have not been able to start the registry.

They could help me they are very new in php but old in phpvms

Link to comment
Share on other sites

 

On 2017-5-2 at 0:04 PM, servetas said:

What is your website url?

I have solved my problem, returning to the previous re-captcha system, until this has solution, just change all the files in the original phpvms folder of Nabeel (phpvms 1.1) and replace them with the 5.5.2 of David Clark (5.5.2)

 

the files show these

public_html/core/lib/recaptcha/ *.php (all files) (previus backup folders)

public_html/core/modules/Registration/Registration.php

public_html/core/templates/registration_mainform.tpl (changed .tpl for .php),

the public key and secret key its the same.

this a site url. (under construction).

http://oneworldv.com

Link to comment
Share on other sites

  • 3 weeks later...

The recaptcha key is free, as mentioned above, however, for those who do not want to mess with it, I've enclosed a bypass file which completely eliminates the recaptcha process all together. I DO NOT recommend this, but if your looking to get started quickly, then please see the enclose file. This will put and overwrite the

Registration.php file, Make sure you always backup up. I just rename things on the Server, example; Registration.php.backup , this usually works great. If you so choose to use this file, do remember to keep a very close eye on applications pending, your open for bots ! Upload the file to the following :: /myserver/core/modules/Registration/Registration.php , You will at least be able to get your Registration up quickly until you fix your issues. Hope this helps you !

Jimbo

Registration.zip

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
On 28/6/2017 at 0:04 PM, MichiGobeli said:

Hello mate, if you still have the problem with Captcha, I suggest you change to the previous version, I did it and I do not currently have a problem for it, just change the phpvms version 1.1 the folders concerning the captcha
[your site.web] / core / lib / recaptcha, (logically creates a copy of everything before you start), all the files in that folder.

The rest is simply changing the recaptcha box like this in the .tpl version.

I hope that you serve or this information helps you, for any doubt if I can help you we are in contact.

regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...