On Mon, 28 Jul 2003, Erik Browaldh wrote:
I have written a program that takes argument from html-formula and read and write it to a textfile.
When I tried it with perl mod 2, under windows with apache it doesnt work anymore. No new entries are written to the log-file.txt Ive tried chmod, especially r/w accesses but that doesnt seem to help.
[ ... ]
alarm(30);
As Mustafa mentioned in another reply, you might want to try it without the flock() below [and also perhaps try without the alarm() call above]. Also, any messages in the error log would be helpful.
[ ... ]
open T,">>log-file.txt" || die "cant open T for write $!"; flock T,2; # write lock
[ ... ]
open (T,"<log-file.txt") || die "Cant open file T for read $!"; flock T,1;
As Stas explained in another thread today, the directory in which these files have been opened may not be the one in which your script resides. Try giving the full path to any files you're opening.
and Colin will post shortly a workaround until we provide an in-core solution.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com