Re: [PHP] Shared memory - linx and PHP newbie

2009-05-22 Thread Richard W
Thanks Daniel for your suggestions. What I have found are: 1) I'm assuming the key is good. A value of 1947143245 is returned. 2) I have set the permission of the shared memory ("program.SCShared") to 777 octal (full read/write/execute access). The group and owner of the file is my login ('eclips

Re: [PHP] Shared memory - linx and PHP newbie

2009-05-21 Thread Daniel Brown
On Thu, May 21, 2009 at 10:15, Richard W wrote: > > Any help will be greatly appreciated, especially answering 2) as to why I > can't read the data. Are you certain that the problem lies within the shmop reading? Check to see if the file is actually being accessed properly, the key is good fr

Re: [PHP] Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-01 Thread Per Jessen
Kent Larsson wrote: > In absence of shared memory and threads. What I really must have is > some kind of mutex functionality. I will be manipulating files on disk > and I don't want two instances to be able to touch the disk at the > same time. Touch the disk or touch the file? I assume you mea

Re: [PHP] Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-01 Thread Micah Gersten
http://us2.php.net/apc Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Kent Larsson wrote: > Hi, > > Is it possible to have shared memory in the form of shared global variables > in PHP? Or any other form of shared memory? And if that is the case, is > there

Re: [PHP] Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-01 Thread Eric Butera
On Mon, Sep 1, 2008 at 5:45 PM, Kent Larsson <[EMAIL PROTECTED]> wrote: > Hi, > > Thank you for your answer. I was hoping there were a solution. :-/ It would > have been nice as PHP has a large install base and is a quite common element > in cheap web hosting solutions. Has anyone else got any more

Re: [PHP] Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-01 Thread Kent Larsson
Hi, Thank you for your answer. I was hoping there were a solution. :-/ It would have been nice as PHP has a large install base and is a quite common element in cheap web hosting solutions. Has anyone else got any more comments or suggestions? In absence of shared memory and threads. What I really

Re: [PHP] Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

2008-09-01 Thread Per Jessen
Kent Larsson wrote: > Hi, > > Is it possible to have shared memory in the form of shared global > variables in PHP? Or any other form of shared memory? And if that is > the case, is there any form of mutex functionality which may be used > to assure syncronized access to this memory? > > My next

Re: [PHP] shared memory access - shmod_open

2007-12-11 Thread Rolf_
I tried the php function chmod($sem, 0644) which works fine even if it converts the octal number too, cf. xdebug trace file: 0.0037 50280 -> chmod('/tmp/1521387531.sem', 420) ...myScripts/test.php:11 >=> TRUE 0.0039 50280 -> shmop_open(2013277949,

Re: [PHP] shared memory access - shmod_open

2007-12-07 Thread Peter Ford
Richard Lynch wrote: > On Thu, December 6, 2007 2:44 am, Rolf_ wrote: >> 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': >> >> > $sem = "/tmp

Re: [PHP] shared memory access - shmod_open

2007-12-07 Thread Rolf_
Yes, thank you. I checked this thread before writing here. But following the hints there does not help either. Rolf. Daniel Brown-5 wrote: > > On Dec 6, 2007 3:44 AM, Rolf_ <[EMAIL PROTECTED]> wrote: >> >> Dear List, >> >> I have a problem working with shmop_open() in a Solaris environment.

Re: [PHP] shared memory access - shmod_open

2007-12-07 Thread Rolf_
Thank you for your reply. shmop_open($sem_key, "w", 420, 1) creates the same error message: --- [07-Dec-2007 12:34:23] PHP Warning: shmop_open(): unable to attach or create shared memory segment in ... [07-Dec-2007 12:34:23] PHP Stack trace: [07-Dec-2007 12:34:23] PHP 1. {main}() ...

Re: [PHP] shared memory access - shmod_open

2007-12-06 Thread Richard Lynch
On Thu, December 6, 2007 2:44 am, Rolf_ wrote: > 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': > > $sem = "/tmp/" . rand() . ".sem"; > touch (

Re: [PHP] shared memory access - shmod_open

2007-12-06 Thread Daniel Brown
On Dec 6, 2007 3:44 AM, Rolf_ <[EMAIL PROTECTED]> wrote: > > 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': [snip!] Rolf, I

Re: [PHP] Shared Memory Problem

2005-11-17 Thread Jochem Maas
Yaswanth Narvaneni wrote: Hi! I found the solution to my prob. SELinux was enabled in the server which needs disabling. After disabling SELinux it was working great. Thanks for your help guys. Another small query though, is there anyway to enable SELinux and as well use shared memory between PH

Re: [PHP] Shared Memory Problem

2005-11-16 Thread Yaswanth Narvaneni
Hi! I found the solution to my prob. SELinux was enabled in the server which needs disabling. After disabling SELinux it was working great. Thanks for your help guys. Another small query though, is there anyway to enable SELinux and as well use shared memory between PHP and C++? I know using Zend

Re: [PHP] Shared Memory Problem

2005-11-16 Thread Yaswanth Narvaneni
Hi! There is a strange problem now. This is the error message my php file gives. "kernel not configured for shared memory kernel not configured for semaphores kernel not configured for message queues" The source is as follows: "; print system("ipcs"); ?> when I logged into my machine as user ap

Re: [PHP] Shared Memory Problem

2005-11-16 Thread Yaswanth Narvaneni
Hi Curt, These are my open shared memories in the server output of ipcs command. -- Shared Memory Segments keyshmid owner perms bytes nattch status 0x 18645001 gOLeM 600393216 2 dest 0x162e 18808842 root 66

Re: [PHP] Shared Memory Problem

2005-11-15 Thread Curt Zirzow
On Wed, Nov 16, 2005 at 03:33:22AM +0530, Yaswanth Narvaneni wrote: > Hi! > > I have a server written in C++ and my webpages are in PHP. The PHP has > to communicate with the server using shared memory. This was working > fine on the server running FC-1 with php-4.3.8. We recently migrated > to Ce

Re: [PHP] shared memory

2004-05-19 Thread venkata ramana
Thanks for your reply, but I afraid you did not get my point. I am talking about shared memory that is used for Interprocess communication. We can access the shared memory created by one C program in other C program and same is the case with php. I am trying to communicate with a C program from php

Re: [PHP] shared memory

2004-05-19 Thread Burhan Khalid
venkata ramana wrote: Is the shared memory created with php comaptible with that created with a C program? I mean to ask, can we access the data written into shared memory by a C program from a php program? I would hope not, as this would cause major security problems and system instability. I *b

Re: [PHP] Shared Memory

2003-03-20 Thread Mincu Alexandru
nope! of course not there are two different procs. On Thu, 2003-03-20 at 17:19, Adam Voigt wrote: > Is the Shared Memory allocated with the SHMOP functions > persistent? Like when a script ends, on the next call > of a script, can you read the same memory block and have > the data be there? > > -

Re: [PHP] Shared Memory Error.

2002-02-18 Thread Lars Torben Wilson
On Sun, 2002-02-17 at 23:34, Paul J. Stevens wrote: > I am using PHP Version 4.0.4pl1 with an Embedded Linux (PeeWee Linux, > which is based on Red Hat 6.2 w/ a 2.2.18 Kernel). > > I have tried using shmop_open(), shm_open() & shm_attach(). All of these > give an error message of "function not d

Re: [PHP] shared memory

2001-04-11 Thread Rasmus Lerdorf
One of the things you have to realize is that Apache-1.3.x is is single-threaded pre-forking multi-process web server. That means that you have many processes handling requests. You never know which process will take a request, so storing any sort of data in a process won't do much good as the n

Re: [PHP] Shared Memory with Yast-installed mod_php4 from SuSE.

2001-01-23 Thread Rouvas Stathis
Hit Thomas, you need to recompile PHP with the options you want (as a shared apache module) and then replace libphp4.so on /usr/lib/apache/ with your own version. A good thing is to keep SuSE's version as a backup:-) Don't forget to restart apache afterwards. (/etc/rc.d/apache stop; /etc/rc.d/apa