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.
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.
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
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!
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.
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
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!