On Thu, 2002-01-17 at 21:17, Ilia A. wrote:
> You have the same script try open the shm segment 2 times, which is WRONG.
> Here is a proper example of what you should be doing:
>
> <?php
> define("SHMKEY", 0xDEAD);
> define("SEMKEY", 0xCAFE);
>
> if( !($shm_id = shmop_open(SHMKEY, 'c', 0644,10)) ) {
> exit("Segment already exists and you do not have write permissions to
>it,
> or you cannot create a new segment\n");
> }
> $data = shmop_read($shm_id, 0, shmop_size($shm_id));
> shmop_close($shm_id);
> echo $data."\n";
> ?>
Well, I know this was bad code, but I pasted code from two different
scripts, and the script I made was short and displayed the problem, so I
think it will do for that purpose :)
>
> I've also committed the patch to CVS that should eliminate the warning
> message. I wonder why Zend required strings with defined length to be null
> terminated, sounds like a recipe for disaster, if the length is known it
> should be used. But, whatever, please try the latest CVS.
Yes, I sent this to the list yesterday, and I can verify it works with
the latest CVS.
Thanks.
-- Robin
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]