I dunno what it would be used for but
I'll install it in a sec. and see if it works.
------------------
You may use all my images posted unless I say otherwise
My place! This message has been edited by Em8 on October 24, 2000 at 07:15 PM
I can tell you right now it won't work.
param() is a CGI.pm function and thusly (since the OO method is being used) all references to param() need to be written as $q->param(). I see at least 6 instances where it is wrong.
Not to mention that:
open("USER",param(user).'.cgi') || die ("Can't Regester you: $! ");
is:
1) a security hole the size of Texas.
2) written incorrectly anyway. USER should not be in quotes, and it is preferable to use 'or' instead of '||' in this situation.
Plus, I see calls to subroutines called lock and unlock (lock being called AFTER information is read in from the file, which is pointless..), yet neither of them appear in the file, nor are any other files require()ed in.
Not recommended that you or anyone else put this on a live server.
--mark
This message has been edited by Mark Badolato on October 22, 2000 at 09:10 PM
****! I suck! I feel stupid
------------------
You may use all my images posted unless I say otherwise
My place!
OOps was that your script?? Sorry, I wouldn't have been quite so harsh.. i thought you meant you found it somewhere because you said you were about to go install it.
Just wondering: Why &lock/&unlock and not flock?
Well, I think he used the Unlock and Lock because he probably saw it on the UBB. Besides Flock doesn't work on all systems.
Flock works on systems that matter. It works on Unix systems, and NT systems. It does not work on Win9x systems, and that doesn't count, as far as CGI applications are concerned.
Anyone hosting apps such as UBB on a Win9x box has bigger problems to worry about than flock.
Sometimes external locking routines are necessary, but they are not preferred due to race conditions. My personal feeling is that flock should always be used, and if that makes it incompatible on a win9x system, too bad.
It's easy enough to code it so that it won't generate an error under win9x, but it just means that win9x won't get locking. That also means that it shouldn't be used in production on a win9x system, but again, my feeling is that win9x systems shouldn't be used in the first place (for production)
--mark
UBB: ubb_library2.pl
YaBB: Subs.pl
Found sub lock/unlock but I'm matching the $ signs.
------------------
You may use all my images posted unless I say otherwise
My place!
Well it did stink. *lol* its stupid. Thats what I get for doing somthing at 2 in the morning.
------------------
You may use all my images posted unless I say otherwise
My place!
Hmm... I am suprised that YaBB use also a &lock/&unlock routine
.
Em8:
Install a webserver with Perl on your local machine and get a good Perl book (O'Reilly
). Its not to difficult to learn Perl.
Christian