jonty Posted June 19, 2008 Share Posted June 19, 2008 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 More sharing options...
ag3nt42 Posted June 19, 2008 Share Posted June 19, 2008 text files use php file system functions to create/store info as well as modify it and read it Link to comment https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569166 Share on other sites More sharing options...
ag3nt42 Posted June 19, 2008 Share Posted June 19, 2008 it will be very complicated however and you may find that using session variables or a database will be much easier to work with. Link to comment https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569170 Share on other sites More sharing options...
kenrbnsn Posted June 19, 2008 Share Posted June 19, 2008 Using session variable will not help the OP share variable values between users. Using a database is probably the way to go. Ken Link to comment https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569213 Share on other sites More sharing options...
rhodesa Posted June 19, 2008 Share Posted June 19, 2008 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 More sharing options...
ag3nt42 Posted June 19, 2008 Share Posted June 19, 2008 it literally takes about 3 min to setup a sql server Link to comment https://forums.phpfreaks.com/topic/110943-server-variables/#findComment-569227 Share on other sites More sharing options...
PFMaBiSmAd Posted June 19, 2008 Share Posted June 19, 2008 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 More sharing options...
jonty Posted June 19, 2008 Author Share Posted June 19, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.