PHP Shared Memory (shmop) problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi, everyone!

I am having trouble with values stored into the shared memory.
Either i create "shmop_write" the value into the segment by cron and i
being able to get it from the memory from command prompt ONLY with "/
usr/local/bin/php -q -f test.php", or i create the same way and the
same segment (after freeing the momory) inside browser through apache
and the value is available for command prompt and apache BOTH.

The question is - if there is a way to make cron to create and delete
variables from shared memory and they would be accessible from apache?

Thanks in advance,

System Specs:
Linux Centos 5 kernel 2.6.18-53.1.21.el5
PHP Version 5.2.6
'./configure' '--with-apxs' '--with-curl' '--with-curl-dir=/usr/local/
lib' '--with-gd' '--with-gd-dir=/usr/local' '--with-gettext' '--with-
jpeg-dir=/usr/local/lib' '--with-kerberos' '--with-mcrypt' '--with-
mhash' '--with-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/
lib' '--with-xml' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--
with-zip' '--with-openssl' '--enable-bcmath' '--enable-calendar' '--
enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-track-
vars' '--enable-mbstring' '--enable-memory-limit' '--enable-shmop' '--

Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8b PHP/5.2.6 mod_perl/
1.29 FrontPage/

mod_ssl, mod_php5, mod_perl, mod_frontpage, mod_setenvif, mod_so,
mod_headers, mod_expires, mod_auth_anon, mod_auth, mod_access,
mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis,
mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status,
mod_negotiation, mod_mime, mod_log_referer, mod_log_agent,
mod_log_config, mod_env, mod_vhost_alias, http_core

Re: PHP Shared Memory (shmop) problem

On Jul 10, 4:14=A0pm, wrote:
Quoted text here. Click to load it

So, I assume memory you allocate/populate from one method is not
available in the other? Then it's just a permissions problem. Try it
with mode 0666


Site Timeline