Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: flat file problem

by gothic_mallard (Pilgrim)
on Oct 28, 2004 at 07:36 UTC ( [id://403295]=note: print w/replies, xml ) Need Help??


in reply to flat file problem

Your code syntax above is incorrect - the line:

open(FLATFILE, ">> /tmp/flatfile.data" or die $!...);

..should read:

open(FLATFILE, ">> /tmp/flatfile.data") or die $!;

I don't know whether this is just an error you introduced while posting this question otherwise it should have given you an error.

Apart from that I can't see anything wrong with the file writing logic which leads me to a couple of conclusions:

Are you sure the permissions are correct? Chances are when you run it via the form it's not using same user account that it does at the command line - and that account may not have permission to write (which is likely as most "web-user" accounts on servers have very few permissions by default for security reasons).

What platform/OS etc is this running on may I ask?

--- Jay

All code is untested unless otherwise stated.
All opinions expressed are my own and are intended as guidance, not gospel; please treat what I say as such and as Abigail said Think for yourself.
If in doubt ask.

Replies are listed 'Best First'.
Re^2: flat file problem
by csuhockey3 (Curate) on Oct 28, 2004 at 07:55 UTC
    Hi gothic_mallard and pelagic . Sorry for the code typo -- indeed it was a mistake writing my post.

    I am working on a development server (Solaris). I will check agian tomorrow and verify my permissions are correct on both the development and production servers. I am wondering if documentroot might be the issue. I suppose it's possible to have /tmp in a different location on each of those servers, although I thought they are mirrors. Thanks for the quick replies from both of you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found