|
-
Jun 2nd, 2001, 02:04 PM
#1
has anybody setup apache
I was trying to setup apache on my machine (win98). I have it setup correctly (I think). well I can run any php script and cgi script. but my problems is that when I run my cgi script I get a flock error
"flock() unimplemented on this platform at library/routines.pl line 688"
ok I know what flock is and the file is using flock. How do I setup apache to run this? or do I have to do something to perl to run it? I have "ActivePerl-5.6.0.616-MSWin32-x86-multi-thread" installed on my machine. could that be the problem? how do I implement flock?
-
Jun 2nd, 2001, 02:44 PM
#2
Monday Morning Lunatic
flock isn't implemented in Perl because AFAIK it doesn't exist or have any kind of relevance on a DOS platform.
If you just comment out any references to it it should work.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 2nd, 2001, 03:53 PM
#3
thanks Parksie, so what you are saying is that because I'm on a win32 machine as opposed to unix/linux it won't run flock? I will just have to comment them out then and hope it still works, should though.
thanks
-
Jun 2nd, 2001, 05:22 PM
#4
Monday Morning Lunatic
I think so. I've not used POSIX systems for a while so I'm a little rusty but that seems to be the case.
Anyway, on Win32 any file open for writing is automatically locked, and files open for reading can't be opened for writing, although you can read from them (unless you use overlapped I/O but I doubt Perl makes any use of that because it's specialist).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 2nd, 2001, 05:45 PM
#5
I tried to comment those lines out and it will run but it won't right to those files it needs to. so I can't add any body to the DB if need to be. or make variable changes. what can I do to make it work so I can change variables or something?
-
Jun 2nd, 2001, 05:49 PM
#6
Monday Morning Lunatic
Do you have a code sample? Is this something you wrote or something you got from elsewhere?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 2nd, 2001, 09:11 PM
#7
ya I got it from somewhere else. in the admin area of the script it has a link to change system variables ( script variables) but I can't change them because it is locked without the flock, he he 
Code:
open(LOCK_FILE, ">$require_path/$file_handle/$lock_file");
flock(LOCK_FILE, 2) if ($flock == 1);
tha tis a sample of one of the routines for flock. I think that maybe the main one. as all the scripts inquire this script
-
Jun 2nd, 2001, 09:15 PM
#8
Monday Morning Lunatic
It looks like what it's doing is getting an exclusive lock (like a Mutex on Win32) on a file, so that nothing else can get it. This way it can guarantee that the current process is the only one using that file, even for reading.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 2nd, 2001, 09:25 PM
#9
I think you have it right. I remember reading that in one of the readme files. so how do I get around this, if not it ain't no big deal cause I just want to play around with the colors of the script. I know the script already works.
-
Jun 2nd, 2001, 09:27 PM
#10
Monday Morning Lunatic
At the very beginning try setting $flock=0
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 2nd, 2001, 10:52 PM
#11
same error as before. no change
-
Jun 3rd, 2001, 05:00 AM
#12
Monday Morning Lunatic
Hmm. Sorry, no idea Maybe comp.lang.perl has more info?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 3rd, 2001, 11:18 AM
#13
thanks anyway Parksie, it was worth a shot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|