Re: Can a script run twice?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-05-24 at 01:45, Lester Caine wrote:
> 
> The double click 'problem' was a sideline to the original problem, which 
> I found while trying to track things. The original problem *IS* that PHP 
> can run two copies of a script in parallel and the second copy does NOT 
> see the 'locking' in place on the first copy. I had always thought that 
> PHP was sequential, but I'm not so sure now.

But PHP doesn't run anything... the webserver passes the request to PHP,
and so if the webserver can process requests in parallel then the race
is on.

As for th elocking... it depends on how the locking is being done. Out
of curiosity, is session data being written to a network filesystem?
because all bets are off for network filesystems when trying to perform
locking on the files (and I think that's how PHP achieves session
locking).

> I've put in a trap for the double click ( and yes it *IS* browser 
> dependent ) and that works fine, but we will have to see if it makes any 
> difference to the original 'race' problem :(

Good luck :)

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux