Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW: Human confirmation v1.0


Bansai

Recommended Posts

I just release a new Contrib.:

 

"Human confirmation" checks if your osC Shop is accessed

by human or by robot (script or some other software).

It is useful to prevent automated registrations.

I am sure you've seen it in the net (try to register

with yahoo.com or dot.tk). The script shows a randomly

generated picture with digits. The picture is a little

bit distorted to prevent automatic recognition.

If you're human you will recognize the number and type

it into a text box.

 

If the number is right the registration will go on as usual,

but if the number ist false or absend the Registrationpage

will show again.

 

( For this Contrib you must have GD-Lib 1.8+ installed ! )

 

:arrow: http://www.oscommerce.com/community/contributions,1476

 

----

 

It is like "Anti Robot Registration Validation", but this one is

much easyer to install :D

 

----

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Installed it as per instructions and when I go to create account,, I get the following error:

 

Warning: imagejpeg: unable to open 'images/temp.jpg' for writing in /var/www/html/includes/human_confirmation.php on line 55

 

any ideals

thanks in advance

Tom

Link to comment
Share on other sites

I solved that issue by creating a blank white jpg and naming it temp,, placing it in the images directory,,, and making it writable,,

 

now,, when I am in create account,, it has the info messed up.

 

where contact information is,, instead of it asking for the phone and fax numbers,, it has a click box for newsletter again,,, which there is still the original one below,,, and ,, it wont let u continue due to not entering the phone number,,, working on this one,, or if anyone has any ideals b4 i figure it out,, please advise,,

thanks again,,,

Tom

Link to comment
Share on other sites

Ok,, half way there,,,

got the phone number part added back in,, not sure if it was me,, or the instructions,,, maybe I just got the wrong spot,, however,, now that i have the phone numbers showing again,, i can not get past the validation,, it just keeps loading the same page,,, no error msg ,, but just keeps looping even though i am typing in what i see

????

Link to comment
Share on other sites

Hi Qwiz,

 

Warning: imagejpeg: unable to open 'images/temp.jpg' for writing in /var/www/html/includes/human_confirmation.php on line 55

 

Thats normally an Error you get if the Image-dir isn't writeable for the user "wwwrun". Its the useraccount that ist used by PHP, CGI etc.

 

Try to make the Directory writeable for all ( CHMOD 775 or CHMOD 777 )

A other try is to create a small "images/temp.jpg" and change this to 775.

 

Bansai!

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Bansai

Thanks for checking in,, with what you said,, I did get it resolved.

chmod the images to 777 ,, 775 didnt work for me,,, but the 777 and removing the temp.jpg i created did allow it to work as it should.

Thanks bunches for the hard work in createing this mod as this was one on my hot list... thanks as well,, for checking the forum and replying so promply

Tom

Link to comment
Share on other sites

using osc 2.2 ms1.

 

I cannot find:

 

$process = false;

if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {

$process = true;

 

in create_account.php

 

 

I did a search in the whole catalog directory via dwmx, and could not find this.

 

Is this for the most recent snapshot or ms2?

Jesse Rooney

Link to comment
Share on other sites

Is this for the most recent snapshot or ms2?

The Contrib is for 2.2 MS2.

I dont know where to cange the line in MS1, but try to find a line similar to:

  ...

  Released under the GNU General Public License

*/



 require('includes/application_top.php');



// needs to be included earlier to set the success message in the messageStack

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);



 $process = false;



if (isset($HTTP_POST_VARS['action'])  && ($HTTP_POST_VARS['action'] == 'process')); 

 

 {

   $process = true;

   if (ACCOUNT_GENDER == 'true') {

     if (isset($HTTP_POST_VARS['gender'])) {

       $gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);

     } else {

       $gender = false;

     }

   }

   $firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);

   $lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);



...

 

The line you are searching for is the line where the processing of the form begins.

>> if (isset($HTTP_POST_VARS['action']) ...

If you dont find this and dont want to update to MS2 mail me youre create_account.php and i try to find out how to change it in MS1

 

Bansai!

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Bonsai

Something strange is happening.

when it comes to create account page,, it will not work,, it keeps looping back,, now,, after the page loads then if u click refresh and then put in the data and random number to match,, it will work,, but if u go straight to the create account,,, then it keeps looping back.

it seems that,, it does not reset each time unless u refresh the page

any ideals?

Link to comment
Share on other sites

Hi Qwiz,

 

that seems to be a caching problem. Maybe the Browser don't load the page again - it only loads the page from the cache ...

 

Verify the lines:

<?PHP

// BOF // Contrib: Human confirmation V 1.0

  if (!tep_session_is_registered('noautamationcode')) tep_session_register('noautamationcode');

  include('includes/human_confirmation.php');

  tep_session_close('noautamationcode');

// EOF // Contrib: Human confirmation V 1.0

?>

 

Do you use cookies or SessionID?

If you use "Spider-friendly" pages and there is no SessionID in the URL than it can happen that the Browser don't get the real page.

Since i use SessionVARS the Variables are only set at the end of a Session (at "tep_session_close") and if the page doesnt reload ...

 

Bansai!

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Bansai

There is no session id in the url,, just the straight url's,,, just done a straight install ... and yes,, that part of the code is in there,,, it does apear its a cache problem,, if i close the browser and reopen it works great,,,

the concern there is if someone opens the page,, and clicks out of it for some reason,,, then comes back,, they wont be able to create the account unless they close it or refresh the page,,

any thoughts around this?

Thanks in advance

Tom

Link to comment
Share on other sites

Hmmm ...

i dont have that problem. Caching on or off - it works. :?:

Try to change the HTML-<head>-Section in create_account.php

from:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

to:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<meta http-equiv="expires" content="0">

That should disable the Browsercache for that page.

 

:arrow: Anyone else with that problem :?:

I need some feedback :!:

 

Bansai!

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Bansai

I have added the line

<meta http-equiv="expires" content="0">

and that has not helped, It apears that when first open the browser,, gointo create account,, it works,,, if u log out,, and create another account,,, it shows the same graphic numbers as the first account confirm numbers,, which,, is not correct,, so it is keeping that graphic in the cache,,, if u close the browser,, or click refresh,, then it changes and works,,, I am using current update of IE,, and this is the only thing i seem to find any problem with,,, still thinking,,, and thanks for trying.

seems strange that i am the only one having this problem,, so it may be on my end,,,

thoughts,, anyone?

Link to comment
Share on other sites

Qwiz,

 

there is one more chance to see whats happen:

Go to the page and at the same time look at the image directory with FTP.

If you first create a account look at the server what image was created - if you create a second account (and the image looks like the same) see whats happen on the server.

If in the Serverdirectory is still the same image then you are in trouble.

Then the caching problem is on the serverside - that cant be solved.

On the other hand: if on the server is a different image than it was showing the problem is on youre side ...

 

Bansai!

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Calm down :lol:

 

I'm working on a version with random filenames for the image. That should solve any caching problems ...

 

Stay tuned :wink:

 

( It's now 1:50h a.m. over here and i try it tomorrow! )

 

Bansai!

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

Bansai

you sound like me,, do my best work late at night,, early morning,,, when i start getting tired,, my brain slows down enough that i can keep my mind on just what i am doing here,,,

thanks for all u'r effort,,,

Tom

Link to comment
Share on other sites

Hi Folks,

 

i released the v1.1 update to my Contrib.

That should solve any caching problems.

 

:arrow: http://www.oscommerce.com/community/contributions,1476

 

I open a new thread for v1.1:

 

:arrow: http://www.oscommerce.com/forums/viewtopic.php?t=56333

 

Feedback are welcome ...

 

Bansai![/b]

Yip yip yip yip yap yap yip *BANG* --- NO TERRIER

Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...

I got the an error while creating an testing an account.

 

Fatal error: session_register(): Failed to initialize storage module: user (path: /tmp) in C:\xampp\htdocs\catalog\includes\functions\sessions.php on line 74

 

 

What's wrong, pls?

Link to comment
Share on other sites

okay, I got the error :)

 

Furhermore, I put German and Turkish language support files into the contribution page.

 

Unfortunately, there is a small error in the german part. Please replace 'autamatisierterter' with 'automatisierter' ...

 

faster fastest error, you know :rolleyes:

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...