Re: [PHP] Socket Madness !!!!
Justin Farnsworth wrote: >Steve Brett wrote: > >>does anyone know the ascii value for EOF ? >> > >I think it is four (CTRL-D), viz: > >| 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel| > Actually EOT is not EOF. There is no such ASCII character as EOF. It is a condition not a character. Different functions that use an EOF condition have different ways of indicating it. There are examples at: http://www.php.net/manual/en/function.fgets.php Here is a link to PHP's feof function: http://www.php.net/manual/en/function.feof.php -- PHP General 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]
[PHP] Posix Shared Memory Support?
I have an application on Linux 2.6.9 which uses posix shared memory and I need to access the shared memory via a web page using php. Looks like PHP only supports System V shared memory, which isn't an option for me in this case. Thanks, -- David George Hark Technologies http://harktech.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posix Shared Memory Support?
On 1/5/2007 5:41 PM, Jochem Maas wrote: David George wrote: I have an application on Linux 2.6.9 which uses posix shared memory and I need to access the shared memory via a web page using php. Looks like PHP only supports System V shared memory, which isn't an option for me in this case. is this what your looking for? http://php.net/manual/en/ref.shmop.php I thought shm and shmop were both system V? I may have misunderstood because in PHP they are accessed with a key, whereas POSIX shm is usually accessed via a name. Of course I could be wrong. :-) Thanks, -- David George Hark Technologies http://harktech.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posix Shared Memory Support?
On 1/5/2007 6:25 PM, Richard Lynch wrote: The User Contributed Notes (*always* read those!) make it clear that shmod is NOT Sys V. It looks like it's not POSIX either, but I could be reading too much into it... Seems more similar to POSIX than Sys V, from my limited experience^H^H^H^H^H^H^H^H^H^H reading. :-) It's possible that "name" was changed to "key" just to be more consistent with the SysV stuff as a migration. Ok, I just downloaded the source and looked at it. shmop is definitely using the System V Shared Memory interface. The user contributed notes say it differs from sysvshm. I take that to mean PHP's sysvshm module. shmop uses shmget, shmctl, and shmat which are the System V shm functions (need to use ipcs and ipcrm to manage them). Posix shared memory uses shm_open(), mmap(), and shm_unlink(). Guess I'll take the source for shmop and make posixshm and contribute it back to PHP. Unless someone else has already done it. Thanks for checking into this for me. Gotta love open source, when in doubt read the source. :-) -- David George Hark Technologies http://harktech.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php