[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
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.
Re: [help] problem with internetopena possibly?
fails randomly after If hURL <> 0 Then
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
Re: [help] problem with internetopena possibly?
Quote:
Originally Posted by
westconn1
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
Re: [help] problem with internetopena possibly?
Quote:
Originally Posted by
xvisceral
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.
Re: [help] problem with internetopena possibly?
Re: [help] problem with internetopena possibly?
can anybody help? i can post up the full VB Source/PHP source if needed.
1 Attachment(s)
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!
Re: [help] problem with internetopena possibly?
Quote:
Originally Posted by
xvisceral
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. :confused:
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
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.
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.