Previous Thread
Next Thread
Print Thread
Rate Thread
#101520 10/22/2000 7:52 PM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
I dunno what it would be used for but
Code
code:

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

Sponsored Links
#101521 10/22/2000 9:09 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
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


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101522 10/23/2000 5:05 PM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
****! I suck! I feel stupid

------------------
You may use all my images posted unless I say otherwise My place! laugh

#101523 10/23/2000 6:32 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
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.


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101524 10/23/2000 8:23 PM
Joined: Sep 2000
Posts: 4
Junior Member
Junior Member
Offline
Joined: Sep 2000
Posts: 4
Just wondering: Why &lock/&unlock and not flock?

Sponsored Links
#101525 10/24/2000 9:35 AM
Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
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.

#101526 10/24/2000 10:30 AM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
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


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101527 10/24/2000 5:27 PM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
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! laugh

#101528 10/24/2000 7:20 PM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
Quote
quote:
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! laugh

#101529 10/24/2000 9:05 PM
Joined: Sep 2000
Posts: 4
Junior Member
Junior Member
Offline
Joined: Sep 2000
Posts: 4
Hmm... I am suprised that YaBB use also a &lock/&unlock routine eek.

Em8:
Install a webserver with Perl on your local machine and get a good Perl book (O'Reilly [Linked Image]). Its not to difficult to learn Perl.

Christian

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)