Hi
I was wondering if anyone has some sample code whereby the PHP script
connects to and reads data from some shared memory in Linux, where the
shared memory was originally created by a* linux thread (as opposed to some
PHP script)*? The example code needs to use shmop_open(...).
Thanks in advanc
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
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
Hi
I have a query regarding shared memory created under Linux and then
accessing it by PHP script.
For my application, I have created a shared memory block in Debian Linux
using the shm_open(..), ftruncate(...) and mmap(...) function calls.
The shared memory block is of size 6304 bytes long. It
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
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
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
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
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
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 question is related to the first one
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,
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
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.
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}() ...
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 (
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
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':
I checked the $sem_key with the Solaris ipcs command. The file exists and
the read/write
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
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
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
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
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
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 CentOS 4.1 (Equivalent to RHEL 4.1) running php-4.3.9. The error it
displays is as
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
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
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?
Thanks,
ramana.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/uns
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?
>
> -
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?
--
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm
Hi all,
I am new to PHP and would like the expert opinion of this forum on
something that I am trying to do
I have about 500K entries (name,value pairs) for which I want ti implement a
very fast lookup. I have access to an Oracle database server but I am afraid
that it does not have any powe
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
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 defined".
It is not clear form the documentation that I have s
Read zend.h to see the structure of zval (the main zend strucutre).
Regards,
Andrey Hristov
- Original Message -
From: "César Gómez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 10:46 AM
Subject: [PHP] read php shared memory with C
Hi all,
Any one knows how to read a memory segment shared by php in C?
I know how to read data from shared memory in C when the segment contains a
(char *) or other type but PHP store the data like a Hash and I don't know
to read it.
Thanks in advance.
P.D: Sorry for my English
--
PHP Gen
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
Hello.
I don't understand it at all. I'm trying to cache some data in a shared
memory segment with PHP 4.0.4pl1's shm functions.
I do this like this:
What I don't understand at all is, why I need to add this "$magic_size_shm"
to the "strlen( serialize( $data ) )" value. The value I need to
Hello,
I've recently started PHP development after a few years of working with ASP.
So far I really like PHP, but am having trouble using some of the techniques
I had in ASP. For example, I really like using ASP's Application object to
cache data in, but I can't seem to have an equivalent in PHP
Hi,
I have a situation where I'd like to store some data in shared memory as
opposed to repetitive database requests. Basically, I'd read in a
(small) database table and serialize the results into shared mem. I've
read through the semaphore and shared memory documentation, but some
things are lef
anuar 2001 12:15
An: Php-General
Betreff: Re: WG: [PHP] Shared Memory with Yast-installed mod_php4 from
SuSE.
On Wednesday 24 January 2001 09:55, Thomas Weber wrote:
> Thanks Stathis i tried it twice to compile it, ./configure ,
> make, make install. but i don't get a new lib
On Wednesday 24 January 2001 09:55, Thomas Weber wrote:
> Thanks Stathis i tried it twice to compile it, ./configure ,
> make, make install. but i don't get a new libphp4.so! I found only
> a libphp4.a wich is 9MB (the original libphp4.so is only 2.5MB .
You forgot the --with-apxs
-Ursprungliche Nachricht-
Von: Thomas Weber [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. Januar 2001 09:50
An: [EMAIL PROTECTED]
Betreff: AW: [PHP] Shared Memory with Yast-installed mod_php4 from SuSE.
Thanks Stathis i tried it twice to compile it, ./configure , make
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
Hi,
i try to use the shared memory functions on a SuSE Linux 7.0 server with
Apache and mod_php4 out of the box installed with yast. For shmop i need to
configure PHP with --enable-shmop with isn't enabled in this installation.
I know how to enable this when compiling and installing the source o
42 matches
Mail list logo