Jump to content

Server variables


jonty

Recommended Posts

I'm having trouble finding the right terms to even do a search on and I'm sure it's really obvious.

 

I'd like to store a variable, the value of which is available and modifiable between different users.

 

It's not cookies, it's not session variables, and a database is overkill, what's the simple way?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/110943-server-variables/
Share on other sites

Definitely database...and if you don't want to go about setting up a MySQL server, check out sqlite. It's a flat file, but once open, you use SQL commands to create tables/run queries etc. I find it great for something that just needs one or two tables (or if i don't have access to an sql server).

http://us.php.net/sqlite

Link to comment
https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569216
Share on other sites

Depending on what you are trying to do (and your server type and configuration), you can use the shared memory functions to share data between any clients visiting a web site (just tested on a Windows development system w/php running as Apache module) - http://www.php.net/manual/en/ref.shmop.php

Link to comment
https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569584
Share on other sites

Thanks for all the answers - I am a bit surprised that there seems to be no modifier to share variables across users.

 

Using a small database is no big deal, just seemed a bit of overkill. Text files I'm not too sure about concurrent access problems but they might work as well. And I'll check out the shared-memory functions--they might be answer.

 

Thanks all - appreciate your help.

Link to comment
https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569709
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.