473,500 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

variable shared by users

Hi,

Is there anyway to share a variable between many web users ?

I've got an array, updated by users's actions.
i do want this same array be available to all web users in their sessions.

This without putting the content of the array in DB or file.

I can not use shmop or sysvsem

Any idea ?
Jul 21 '05 #1
5 1517
>Is there anyway to share a variable between many web users ?

I've got an array, updated by users's actions.
i do want this same array be available to all web users in their sessions.

This without putting the content of the array in DB or file.

I can not use shmop or sysvsem

Any idea ?


This is generally what a database is used for. And a database or
file is about the only way you will get the functionality you want.

Gordon L. Burditt
Jul 21 '05 #2
otiteca wrote:
Hi,

Is there anyway to share a variable between many web users ?

I've got an array, updated by users's actions.
i do want this same array be available to all web users in their
sessions.

This without putting the content of the array in DB or file.

Why don't you want to use a DB or file?


Brian
Jul 21 '05 #3
JDS
On Thu, 21 Jul 2005 19:07:57 +0200, otiteca wrote:
This without putting the content of the array in DB or file.


serialize the array and put it in a database or file.

oops! You don't want to put it in a db or file. well why the hell not?

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Jul 22 '05 #4
> Is there anyway to share a variable between many web users ?

I've got an array, updated by users's actions.
i do want this same array be available to all web users in their sessions.

This without putting the content of the array in DB or file.


What you want is a global site variable. I don't think PHP can do
that...

That would make it easy to create counters of various types, shout
boxes, and a lot of other things, but without the overhead of the db,
or file...

I guess the DB is your choice for now.

-- Evanescent Lurker --

Jul 22 '05 #5
NC
otiteca wrote:

I've got an array, updated by users's actions.
i do want this same array be available to all web users in their sessions.

This without putting the content of the array in DB or file.
I can not use shmop or sysvsem


Well, since you are being so restrictive, how about combining the
two methods? :) Configure a small RAM disk or a HEAP table in MySQL
and store your stuff in a file on that RAM disk or in a record
(perhaps the only one) in the HEAP table... No disk spinning will
be involved; the data will remain in memory and will be shareable
between as many users as you want...

Cheers,
NC

Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7094
by: Dan Elliott | last post by:
Hello, Converting from a working C program to C++, I run into the following error: I have a header: (header.h) namespace shared{ ... struct X{ ...
4
11706
by: John Kraft | last post by:
Hi all, My question is more of a phylisophical one here, but I am wondering what the difference is (effectively and performance wise) between using a shared variable/static variable and using a...
3
462
by: ton | last post by:
Hi, I keep several variables in a statevalue like: Dim session As SessionState.HttpSessionState = System.Web.HttpContext.Current.Session session("connect") = " FKHFSF " I thought that these...
5
1770
by: Manuel Arroba | last post by:
I had the idea that two users code are being run by two different instancies, so from the variable values point of view they are complete independent. I have an asp.net that calls a module...
15
5735
by: joun | last post by:
Hi all, i want to create in my asp.net application a custom server variable, so i can retrieve later in other pages (even asp or perl) with request.servervariables("HTTP_mycustomvariable") ...
3
4916
by: Tarren | last post by:
Hi: In Visual Basic is there the equivalent of a Session variable where I can store variables in memory while the executable is running? I have been coding ASP .NET for some time, but am new to...
12
1814
by: Zeppelin | last post by:
Hi, I have to port from asp a script that adds an ip to a list in plain text or an array. I need not using a database or filesystem, it has to be stored in memory in order that giving us best...
5
1423
by: Steve Mauldin | last post by:
Having weird things happening with my code. Two users on at the same time and data entered by one user is added into another users global variable. global variable data being stored in session...
3
1135
by: GHawley | last post by:
I have a fairly large application with about 200 users that uses Session variables. It would seem that occasionally these variables are being referenced incorrectly to the extent that different...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.