Results 1 to 13 of 13

Thread: [help] PHP/Visual basic online auth system

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    [help] PHP/Visual basic online auth system

    Okay, so I am using this code to verify that people have authorization to use my program.

    It checks an online database... Here is the code

    -see attachment below for full php/vb code-

    The code works fine for almost everybody...but for some users, it will randomly not connect to the website at all. Has occured on XP, Vista and 7, but is also confirmed working on XP, Vista, 7.

    Does anybody see a reason that it could be?

    For example: the user Bob with the ID of 123 is in the database, but when Bob on his computer with ID 123 runs it, it does not access the website, so it says that he is not allowed permission to the program.

    Bill with the ID 456 enters Bill and it connects fine. both users are in my database
    Last edited by xvisceral; Feb 19th, 2010 at 03:16 AM.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [help] problem with internetopena possibly?

    There are several If statements in your CheckUser routine, and for one of them the condition is failing.

    As the only information you pass back is whether or not everything succeeded, you can't tell which one it was... so add something else to say at which point it failed (and preferably the values of relevant variables, such as szData).

    Once you know where it is failing, you may be able to easily work out why - or at least tell us the details so we can try to work it out.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    Re: [help] problem with internetopena possibly?

    fails randomly after If hURL <> 0 Then

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: [help] problem with internetopena possibly?

    you could try a loop for however many tries to see if it will connect the second, 3rd to nth attempt
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    Re: [help] problem with internetopena possibly?

    Quote Originally Posted by westconn1 View Post
    you could try a loop for however many tries to see if it will connect the second, 3rd to nth attempt
    it will never auth for that person, ever

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [help] problem with internetopena possibly?

    Quote Originally Posted by xvisceral View Post
    fails randomly after If hURL <> 0 Then
    Exactly which line(s) does it fail on?

    What are the values of the variables when it fails?


    Until you answer those questions fully, there is no way to work out for sure why it is failing.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    Re: [help] problem with internetopena possibly?

    hUrl = 0

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    Re: [help] problem with internetopena possibly?

    can anybody help? i can post up the full VB Source/PHP source if needed.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    28

    Re: [help] problem with internetopena possibly?

    Here is the source to the php/visual basic

    Create a database/user/pass on your site, edit config.php and then upload all files to your site. then run install.php (Admin login on install will be whatever you set it to.)

    once installed, navigate to login.php and login. then click create user.

    add a user with your username/hardware ID, make sure to choose 'enable user'.

    if you dont know your hardware ID, then just call GetVolumeID in the project.

    then update your URL in the vb6 program. click run, see if you can get it to work. works for most people, but not for some!
    Attached Files Attached Files

  10. #10
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [help] problem with internetopena possibly?

    Quote Originally Posted by xvisceral View Post
    hUrl = 0
    That didn't even come close to answering the questions I asked.

    As you have now removed the code (and replaced it with something that most people wont be able to even open, let alone run - and even if they could it would mean far more work for them), I guess you don't actually want to find a solution.

  11. #11
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: [help] PHP/Visual basic online auth system

    any registration system that requires internet access, to run the program is imho flawed anyway

    i agree with si that, it would seem to be too much of an imposition, to have to create a web area to test this, also pointless as the problem maybe server related
    if you want it tested at all it should be on the server in use, with a dummy user set up for registration and by your description the code may work perfectly fine for many

    have you tried changing intrnet_open_type_preconfig to internet_open_type_direct?
    as this is registry dependent it could affect some users and not others

    the code in your project is not the same as previously posted (and removed) as it is not testing for valid connections
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  12. #12
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    280

    Re: [help] PHP/Visual basic online auth system

    I am surprised that nobody has mentioned the firewall yet. Are some users being blocked for security reasons. The code works on most so look around it to find the problem.

    Yes I agree, you really should answer Si's question as he is trying to help you.
    Slower than a crippled Vista
    More buggy than a fresh XP install
    Look! Down the road, some 50 miles behind the drunken snail.
    It's Ubuntu!

  13. #13
    New Member
    Join Date
    Feb 2010
    Posts
    1

    Re: [help] PHP/Visual basic online auth system

    solution,

    remove the code from form_load.
    add an command button and put the code in the command button.

    (reason) the program wasnt able to load the module successfully so you need to make an command for the program to set itself up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width