[nycphp-talk] Using shared data at the server level

CHUN-YIU LAM chun_lam at
Sun Mar 16 13:10:11 EST 2003

maybe you can used shared memory?

lookup and shm_attach and related functions.

----Original Message Follows----
From: "Ophir Prusak" <ophir at>
Reply-To: talk at
To: NYPHP Talk <talk at>
Subject: [nycphp-talk] Using shared data at the server level
Date: Fri, 14 Mar 2003 11:05:12 -0500
Received: from ([]) by with Microsoft SMTPSVC(5.0.2195.5600); Fri, 14 Mar 
2003 08:05:49 -0800
Received: from ( [])by (8.12.6/8.12.6) with ESMTP id h2EG5CJH042462for 
<chun_lam at>; Fri, 14 Mar 2003 11:05:49 -0500 (EST)(envelope-from 
null at
X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP
Message-Id: <200303141605.h2EG5CJH042462 at>
X-Paralist-Archived: <>
X-List-Software: Paralist 0.6
List-ID: <>
List-Owner: <mailto:listmaster at>
List-Archive: <>
List-Subscribe: <>
List-Unsubscribe: <>
Organization: New York PHP
X-Mailer: Paramail 0.5
Return-Path: null at
X-OriginalArrivalTime: 14 Mar 2003 16:05:50.0172 (UTC) 

Hi All,

I'm looking for the best way to store non-critical frequently updated data
that needs to be shared across all php processes (on a single server).
Please notice I say frequently updated. If I'm just storing something that
only changes once every N requests (where N is a large number) then I'd just
use the file system since the OS caches that anyways.

For example, lets say I wanted to have a page counter on every page.
Ideally, I'd just have a variable which is read/write by any php process on
the server. Something like this:

$my_super_global ++;
print "this is page view $my_super_global";

One way is to use the file system.
This or course is pretty simple, but since the file needs to be updated
every single request, I'm thinking it would be faster to use memory.

Has anyone done anything like this ?

Does anyone know of any existing or built in packages can I use ?


--- Unsubscribe at ---

STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

More information about the talk mailing list