i want to have a variable that has the same value for all the different users/clients accessing the system.
also the variable\'s value has to be modifiable.
Just use a database table for storing that value.
That's the simplest way to store persistent application-wide data in a Web application.
Store the variable in a shared space like
A file
A database record (easiest for implementing locking, see below)
A memcache bucket
you can easily modify it there. You may need to use some sort of locking mechanism to prevent race conditions when multiple users try to edit the value at the same time.