FW: [PHP] Using SysV Shared Memory in PHP
| From: | Krznaric Michael | Date: | Thu, 31 Aug 2000 16:02:54 +0000 |
| Subject: | FW: [PHP] Using SysV Shared Memory in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-14635@lists.php.net to get a copy of this message | ||
what about the source? Did you give that a try?
mike
-----Original Message-----
From: Ilia Alshanestky [mailto:iliaa@home.com]
Sent: Thursday, August 31, 2000 11:53 AM
To: php-general@lists.php.net
Subject: [PHP] Using SysV Shared Memory in PHP
Hi,
I'm trying to write a C daemon that would place some data in shared memory
for php to read. My C daemon takes a query via an AF_UNIX socket (Unix
domain).Once it process' the query it puts the data into shared memory and
writes the shm key back to the socket so the php process knows which key to
attach.
Now my problem is,
That php doesn't offer a simple C style shm_at, it has shm_get_var which
expects the data in shm to be formatted in such a way that php can
understand. I've had php put some test data into shm, when I analyzed the
memory address where it put the data I noticed a PHP header of sorts.
Unfortunately there are no docs as to what that header is and what format it
is in. Now as I understand in order for php to read shm created by C I need
to add the same type of a header to SHM my C program creates. How can I
create this "header" is there any docs, or maybe some one would be kind
enough to offer an example?
Thanks,
Ilia