FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Failed to write to a text file (text file is RW)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Failed to write to a text file (text file is RW) [message #171478 is a reply to message #171475] Wed, 05 January 2011 08:47 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On 05/01/11 03:19, justaguy wrote:

> "
> It should NOT be world writable,
> "
> world writable means to let Internet users to write to it, so, the
> global w attribute is removed, how could an anonymous user
> write to it?

No. The file system access attributes control access for the server file
system. Internet users are not logged on to the server as users. The web
server process is the user that is accessing the file.

eg If your web server process runs as user www_data then www_data will
be the owner of any file it creates, and will only need owner rw access
to read and write the file.

> "
> You can single thread access on some OS's - see flock() in the PHP
> documentation.
> "
> sample code? Since I'm not a php coder and don't intend to become
> one, at least not now... could you save me some time?

There's usually plenty of code examples in the user added notes to the
php manual. Go read.

> "
> But better is to use a database, which will solve all these problems.
> "
> No, not practical, this is a temp task (a poll).

The database functionality may already be there, simply waiting for you
to take advantage of it.

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Print PHP Manual
Next Topic: Fetching an external web page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 02:58:37 GMT 2024

Total time taken to generate the page: 0.05148 seconds