Others have already pointed out some good tips. Always check the return value from open calls. If you had I would suspect you would have received some form of permission denied error.
Apache, for example, will (or should) run your CGI progs as 'non-real' users for security reasons. You'll probably find that your prog is run as user nobody or www or something similar. That user probably doesn't have permission to write anything to whatever directory you're trying to create date.tmp in.
-- vek --In reply to Re: Runs from console but not as CGI - temp file not created
by vek
in thread Runs from console but not as CGI - temp file not created
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |