noCaptcha reCaptcha for phpVMS

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](< base_url >/applications/core/interface/file/attachment.php?id=1415)

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/DavidJClark/phpvms_5.5.x/commit/754a24f7619327fa027ab958f45be818e948d96c

Sounds great, Dave!

I’ll test it once I get my messed up registration thing working again (I know how I messed it up, it’s not pretty)

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.

You can remove it if you want. It is a security feature of the later versions to help protect template files.

Roger that.

Just letting you know, testing it with whatever version I used for my phpVMS fixed version I have in a different thread, it works extremely well! Great work!

Noob question here !

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

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');

Does it matter if we have the pages in the skins folder itself (/lib/skins/) or does it have to be in the /core/pages/ for it work ? I have tried with my pages on the skin folder and it doesn’t seem to work.

Any workaround for this issue ?

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.

At the moment, phpVMS 5.5x is a big jump, my skins won’t work, so I’m staying with my fixed and modified package of an older version.

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

It’s probably because of the big jump of versions; so much has been change (including template files are nonexistent) that I suggest you make a fresh install and then copy and paste code snippets back into phpVMS.

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.

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?

What are the errors exactly?

Just going to say, I’m going off a lack of sleep, so I might not be able to understand what I usually would, . Too much stuff to do.

What files were you editing, just re upload them and start again.

What files were you editing, just re upload them and start again.

Correct, you can always start new by backing up your skin folder and local.config.php file. Any editied file should be placed in your skin folder if possible.

@t_bergman - next time post sooner!!! You’d have saved me sooooo much wasted time! 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

Glad everything is working for you.