i am creating an app that must check(count) users'(write-intensive) requests.
‘shmop_open(MY_INT_USER_ID, … )’ returns a system ID for shared access but i am not sure about this, is there any limitation for shmop system IDs on 64-bit OS? Or does this cause problems, such as collisions?
So I originally wrote a big post about how to change shared memory settings in Linux, but then I re-read your question and noticed you were asking about the “system id” passed to
shmop_open.The “system id” is just a 32-bit integer that acts as a key. There’s no magic to it, and the only real limitation is that it’s not zero and is under 32 bits. Yes, this is true even on 64-bit systems running 64-bit PHP. It’s a POSIX thing.
Beware that there’s no namespacing or effective security control. External programs that know about the key are able to access it, assuming that you’ve set the permissions accordingly. Shared memory isn’t appropriate for use on shared hosting.