Reply to Re: Multi user environment.

Your name:

Reply:


Posted by Joseph S. on 11/09/85 11:31

> Even if these events only occur once in a day, your database is
> immediately unsynchronised, and will probably require manual
> intervention to sort it out.
> IMO, a cron job is unnecessary. If you store the "check-out" time of
> each article in the DB, then you can perform time-out checks can be
> performed every time a user requests a PHP page.

> e.g. perform the following query at the top of every script:
>
> UPDATE articles
> SET isCheckedOut = 0
> WHERE (checkOutTime + X) < NOW()
>
> In practice, you can probably find ways to avoid doing this amount of
> processing in every script, but you get the general idea...

I had the same problem, too. I did the cleaning up process through a
php page that was called less frequently, but not as much to keep the
flag On for half a day. By estimate,(not reliable, but the best I could
think of at that time) this page would be run every half or one hour.
After doing all the work the page was supposed to do, it called this
little cleanup() function, something which it was not _supposed_ to do,
but did a good job of.

My question is, is there no daemon creating mechanism in PHP?

Any clues, googling gave this one useful result:
http://www.phpclasses.org/browse/package/2197.html
but not exactly what I am looking for -

making any script or function run continuously.

The only things we have continuously present is the superglobals
$_GET,$_POST,$_SERVER etc.- no code.

Joseph S.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация