shared memory access - shmod_open

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

 



Dear List,

I have a problem working with shmop_open() in a Solaris environment. The
following cli-script works fine, except shmod_open returns a warning 'unable
to attach or create shared memory segment':

<?php
$sem = "/tmp/" . rand() . ".sem";
touch ($sem);
echo "sem $sem \n";
        
$sem_key = ftok($sem, 'w');
echo "sem_key $sem_key \n";

if ($sem_key == -1) { die ("ftok error"); }
        
$shm_id = shmop_open($sem_key, "w", 0644, 1);
echo "shm_id $shm_id\n";
?>

I checked the $sem_key with the Solaris ipcs command. The file exists and
the read/write rights are correct. I tried explictly to call shmop_open with
the right key - the error message remains the same. 

Checking out different access mode like "r" does not succeed too. In the
Xdebug output, php changes the value 0644 to 420, i.e.
shmop_open(1258300033, 'w', 420, 1). Of course, I compiled php with
--enable-shmop.

Does anyone has an idea what I might also check?

Thanks in advance,
Rolf_
-- 
View this message in context: http://www.nabble.com/shared-memory-access---shmod_open-tf4954760.html#a14188465
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
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