Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
CGI Script Timing Issue
System
Hi,
I have seen some topics on this, but I really did not see a solution. I have a CGI script that is executed from within TeamSite from the action menu bar. This CGI script captures all the data from the user and copies the content to the a txt file. Before the contents is copied, the original file (.txt) is copied to a back up file. In the CGI script, I have a check to see if the user has a "write" permissions using the perl file opertator test (-w). If the user does not have access, I perform an Alert message and close the window to notify the user does "not have access". I am getting this message (on random occasions) even when I know I have permissions. I will get the message, click "okay" and then try to access it again with success. There seems to be a timing issue. I am not sure of what code to put in my script to prevent this from happening. I was thinking of using the "sleep" command before checking for permissions, but this slowed down my script a lot. Any thoughts?
Thanks in advance.
Find more posts tagged with
Comments
nipper
There is nothing systemic in Perl that will cause something like this. You may want to trim down some of the code into a something that shows the problem and post that. People can then run it.
Also, what OS are you on ? Is this a file inside or outside of TS ?
Migrateduser
Hi,
This file is created within TeamSite.
We are running the following:
TeamSite 6.71.
Solaris 9
Here is the basic code:
if (! -w $fpath){ #$fpath contains the path from iwmnt/
$user_access = "true"
}
.
.
.
.
.
if ($user_access){
alert(' You do not have the proper permissions to update the file.');
window.close();
}
As mentioned in my first post, I get this error on a random occurance. I seem to get it as soon as the file is created that the CGI script writes to. If I wait a few seconds, I do not get this message. Again, it is random.
Thanks,
James
nipper
Which path are you using ? /.iwmnt or /iwmnt ?
Migrateduser
Hi Nipper,
I am using /iwmnt.
Thanks,
James
nipper
Hi Nipper,
I am using /iwmnt.
Thanks,
James
You may want to try the non-cache mount point /.iwmnt
Migrateduser
Thank you very much Nipper. I am very new to TeamSite (started June 1st). Where can I get information regarding /iwmnt verus /.iwmnt.
Again, I appreciate your help and response.
Thanks,
James
nipper
Not well defined (anymore). The manuals mention it for CGI but it is the non-cached mountpoint. Having worked with TS for several years, I learned it long ago.