note 46709 added to function.ftok
| From: | mbowie at buzmo dot com | Date: | Wed, 20 Oct 2004 21:41:08 +0000 |
| Subject: | note 46709 added to function.ftok | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78854@lists.php.net to get a copy of this message | ||
If you're planning to use ftok() to generate an IPC identifier to share with other
applications, note that PHP uses the ASCII value of the proj parameter to generate the key, not the
proj (aka id) parameter itself.
The result of this is that if you're using "1" as the id on the PHP side, you'll
need to use 49 elsewhere.
This may not be the case under all OS's, but certainly is for FreeBSD which requires the id
parameter passed to ftok to be an int.
Also of note, ipcs and ipcrm are extremely useful for debugging SysV queues etc.
References:
http://www.freebsd.org/cgi/man.cgi?query=ftok
http://www.asciitable.com
----
Manual Page -- http://www.php.net/manual/en/function.ftok.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46709
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46709&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46709&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46709&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46709&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46709&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46709&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46709&report=yes
Search -- http://master.php.net/manage/user-notes.php