#! /usr/bin/php -q
<?php
$key = ftok("/etc/passwd", 'c'); $shmid = shm_attach($key);
$shm_var = "Shared Memory Data"; shm_put_var($key, 25, $shm_var); $shm_data = shm_get_var($key, 25);
echo "$key, $shmid, $shm_var, $shm_data\n";
shm_detach($shmid);
?>
When I try and run it, I get these errors:
Warning: 1661167266 is not a SysV shared memory index in /home/jason/dev/php/ipc/shm1.php on line 9
Warning: 1661167266 is not a SysV shared memory index in /home/jason/dev/php/ipc/shm1.php on line 10
Am I doing something wrong, or is this a problem with PHP?
Jason
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php