Script URL: http://www.beanybux.com/support
Version of script: 2.5.2
Hosting company: Beanyhost.com
URL of phpinfo.php: N/A
URL of session_test.php: N/A
What terms did you try when SEARCHING for a solution: Captcha / Recaptcha
Write your message below:
I had been using an alternative Captcha, with Hesk 2.4, however with the newest version I am having an issue.
I am using Solve Media for my captcha script:
https://portal.solvemedia.com/portal/help/pub/php/
On my site I have modified the code from Recaptcha to Solve Media however when I click submit I get an error=1 with a blank page.
The only pages I modified were:
1. index.php
** Line 698 **
// Not verified yet, should we use Recaptcha?
elseif ($hesk_settings['solvemedia_use'])
{
?>
<script type="text/javascript">
var ACPuzzleOptions = {
theme : '<?php echo ( isset($_SESSION['iserror']) && in_array('mysecnum',$_SESSION['iserror']) ) ? 'white' : '300x150'; ?>',
custom_translations : {
visual_challenge : "<?php echo hesk_slashJS($hesklang['visual_challenge']); ?>",
audio_challenge : "<?php echo hesk_slashJS($hesklang['audio_challenge']); ?>",
refresh_btn : "<?php echo hesk_slashJS($hesklang['refresh_btn']); ?>",
instructions_visual : "<?php echo hesk_slashJS($hesklang['instructions_visual']); ?>",
instructions_context : "<?php echo hesk_slashJS($hesklang['instructions_context']); ?>",
instructions_audio : "<?php echo hesk_slashJS($hesklang['instructions_audio']); ?>",
help_btn : "<?php echo hesk_slashJS($hesklang['help_btn']); ?>",
play_again : "<?php echo hesk_slashJS($hesklang['play_again']); ?>",
cant_hear_this : "<?php echo hesk_slashJS($hesklang['cant_hear_this']); ?>",
incorrect_try_again : "<?php echo hesk_slashJS($hesklang['incorrect_try_again']); ?>",
image_alt_text : "<?php echo hesk_slashJS($hesklang['image_alt_text']); ?>",
},
};
</script>
<?php
require(HESK_PATH . 'inc/recaptcha/solvemedialib.php');
echo solvemedia_get_html($hesk_settings['solvemedia_public_key'], null, $hesk_settings['solvemedia_ssl']);
}
// At least use some basic PHP generated image (better than nothing)
else
2. hesk_settings.inc.php (added the following for solvemedia)
$hesk_settings['recaptcha_use']=1;
$hesk_settings['recaptcha_ssl']=1;
$hesk_settings['solvemedia_use']=1;
$hesk_settings['solvemedia_ssl']=0;
$hesk_settings['recaptcha_public_key']='removed';
$hesk_settings['recaptcha_private_key']='removed';
$hesk_settings['solvemedia_public_key']='removed';
$hesk_settings['solvemedia_private_key']='removed';
$hesk_settings['solvemedia_haskey']='removed';
3. submit_ticket.php
** Line 103 **
// Using ReCaptcha?
if ($hesk_settings['solvemedia_use'])
{
require(HESK_PATH . 'inc/recaptcha/solvemeidalib.php');
$privatekey="removed";
$hashkey="removed";
$solvemedia_response = solvemedia_check_answer($hesk_settings['solvemedia_private_key'],
$_SERVER["REMOTE_ADDR"],
hesk_POST('adcopy_challenge', ''),
hesk_POST('adcopy_response', '')
);
if (!$solvemedia_response->is_valid)
4. solvemedialip.php was added to /inc folder
I am certain that there is an issue with the way the response is being handled when the form is submitted, either filled out or not.
I have changed the settings back to now show the simple image captcha that is there by default and works, the Recaptcha also works, but I am not interested in either of these ones, and would like to use Solve Media Captcha instead.
If Solve Media is active, the add new ticket page shows the captcha, the problem is the submission, where as I get an error and a blank page.
Any help would be appreciated.
Captcha
Moderator: mkoch227
Re: Captcha
While I was re-reading this post, I had noticed that I had a typo in my file name:
3. submit_ticket.php
** Line 106 **
require(HESK_PATH . 'inc/recaptcha/solvemeidalib.php');
Should have been:
require(HESK_PATH . 'inc/recaptcha/solvemedialib.php');
Now the response seems to work, as if I submit an empty form, I get the following:
Error: Please correct the following errors:
Please enter your name
Please enter a valid email address
Please confirm your Email address
Please enter your ticket subject
Please enter your message
Missing required field: Beanybux.com Member Name
Which is a normal response, except that I didn't get a Recaptcha error, instead I got the following displayed where the captcha is supposed to be:
SPAM Prevention: * Test passed
My assumption is that the although I am able to get the form errors displayed, and not the captcha could be that it's not being properly redirected after submission.
3. submit_ticket.php
** Line 106 **
require(HESK_PATH . 'inc/recaptcha/solvemeidalib.php');
Should have been:
require(HESK_PATH . 'inc/recaptcha/solvemedialib.php');
Now the response seems to work, as if I submit an empty form, I get the following:
Error: Please correct the following errors:
Please enter your name
Please enter a valid email address
Please confirm your Email address
Please enter your ticket subject
Please enter your message
Missing required field: Beanybux.com Member Name
Which is a normal response, except that I didn't get a Recaptcha error, instead I got the following displayed where the captcha is supposed to be:
SPAM Prevention: * Test passed
My assumption is that the although I am able to get the form errors displayed, and not the captcha could be that it's not being properly redirected after submission.
Re: Captcha
The "SPAM Prevention: * Test passed" is a normal and intended response after you successfully solve the captcha, so you don't have to solve it every time in a session if some required info is missing.
After the ticket has been submitted (or all browser window closed) the captcha should appear again.
After the ticket has been submitted (or all browser window closed) the captcha should appear again.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools