Gossamer Forum
Home : Products : DBMan : Customization :

problems with mod secure lookup with slow server

Quote Reply
problems with mod secure lookup with slow server
Hi there,

two users have reported the problem to me before, however I could not duplicate the events up until now.

Here are the events as I see them...
- I signed up for a test account (User ID and email have not been used before)
- when haveing two browser windows open one can see, how the new account faily q˙ickly in the admin view. At this pont the sign-up window is still working.
- After a minute or so (I said slow days!!!) the message comes up, that the User ID has already been used.

How can this happen?

Jakob


Quote Reply
Re: problems with mod secure lookup with slow server In reply to
1) You probably need to increase your FLOCK value.
2) If you have tons of records in your .pass file (like in the 1,000's), then that is another problem.

Regards,

Eliot Lee

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,

are ou talking about the falue in
flock(PASS, 2) or &cgierr("unable to get ... $!");
???
Should I change the 2 to a 4???

Jakob

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,

how/where do I increase the Flock value????

Jakob

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hello Jakob, I do not have a definite answer for you but, I'm willing to help you locate and isolate the problem.

In db.cgi - sub get_defaults
check that the value is listed as:
if ($db_use_flock) { flock(ID, 1);}
$default{$db_key} = <ID> + 1; # Get next ID number

It is my understanding, from reading a post by StevePlant 25-Mar-00 07:03 AM (which JPDeni agreed with) - - - wow! I've done a LOT of looking for an answer - - - that even though the second screen will display the same ID number in the second screen display, DBMan will in fact, continue "looking" for the next available ID number to use in the event there is a duplicate - as long as $db_use_flock = 1; is set in the config file

Reference http://gossamer-threads.com/...w=collapsed&sb=5

<wink> Hope I've gotten all of that accurate!

The way to test it would be to open to Add New screens as you've described. Both should then have the same ID number. Submit a new record in the second window then, go back and complete the first record and submit it. The actual record should have a different ID number than what had first appeared.
If this doesn't work - please post the url to your dbman and copy your db.cfg and db.cgi files as text files and upload to your server and include the url's where those files can be viewed.


Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,

sorry, that I didn't describe my problem more precisely. The error occurs when a new user subscribes to the database.

Jakob


Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Jakob, the answer should still apply. When a new user registers to use the db, they are should automatically be assigned an ID number if you have set your db config to use a unique key. Please copy your default.cfg file as a text file (default.cfg.txt) and upload to your server so it can be viewed to see what settings you have used.

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,

the problem is not the UID. I am using the secure lookup mod. When a user applies for a new account he/she enters a username and an email address. After pressing submit a line is added in the pass file.
The works in 99.9% of the cases. However if the server is slow the line is added in the passfile and after this happens dbman seems to check if the username has already been used or not by someonme else. The search returns true eventhough the username was just added by that user himself. - I didn't believe it myself until it happend to myself.

You can view the files under http://www.ndh.net/home/moehs/default.cfg. The other files are also uploaded there. Since that server doesn't support cgi-bin they can be viewed.

Jakob

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi Jakob,

The file you directed me to appears to be the default config which is included with the dbman download. The only obvious change I saw was $db_dir_url Are you using the default setup file for your database?

Jakob, I will not download files for viewing, if you are unable to copy the files as text files and make those available, I cannot view the other files.

http://www.ndh.net/home/moehs/html.pl for example, will cause the file to begin downloading - I cannot view the file in that format. It needs to be saved as htmpl.pl.txt then uploaded to your server.




Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,

well I am sorry. When I enter the URL into my browser I am not promted to download. So why should I asume this by others...
So please accept my apologies. However I don't think that I deserved such a harsh answer...

I just change the names to
auth_pl.txt
db_cgi.txt
default_cfg.txt
html_pl.txt

Thank you for your help!

Jakob





Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,
here some more info to my files...
I am using the basic framework of dbman. I have several mods running. Here a small list: multi select fields; secur lookup; universal date translater; exel export; who's online; preview record before adding; mass mailer; send record; view and edit logfile online and several own productions.

Jakob



Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hello Jakob, I'm sorry you took offense at my previous reply. I am still confused on the files you have directed me to review. In html_pl.txt, you have fields such as VALUE="$rec{'Mobiltelefon'}" identified. The default_cfg.txt which you have directed me to does not have that field identified.
Visit http://www.ndh.net/...oehs/default_cfg.txt and you'll see that this is a different config file than what's needed for the html_pl.txt file.


Quote Reply
Re: problems with mod secure lookup with slow server In reply to
I am SORRY!

No Idea how that happend. I have just uploaded the original files again!

Jakob

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
You're right, Jakob, you have a lot of mods in here! I think I have bitten off far more than I can chew in trying to identify the cause of the error :(

I noticed a couple oddities, things I really didn't understand what was happening or why - all in all though, it was not obvious to me what may be going wrong. I did run your scripts thru a perl check and no errors in syntax were reported.

I do have one question though $db_key_track = 1; Since you are using 'LfdNr' (user input) for your db key, why would you have dbman tracking the count?

I am really sorry I haven't been more help on this!



Quote Reply
Re: problems with mod secure lookup with slow server In reply to
Hi,
LfdNr is could be edited by admin, however I haven't done it so far. It is my recors No.

Thank you for the help, anyway!

What perl check are you talking about? Where can I download?

Jakob

Quote Reply
Re: problems with mod secure lookup with slow server In reply to
In Reply To:
What perl check are you talking about? Where can I download?
JPDeni had provided excellent detailed instructions for obtaining/installing ActivePerl about a month ago. Read thru the folowing thread. Already has become a valuable tool for me!
http://gossamer-threads.com/...w=collapsed&sb=5