fractz Posted November 25, 2006 Share Posted November 25, 2006 Hi,I've only been looking at php for a couple of weeks. I'm trying to figure out if there's any way to keep a very small amount of persistent data server wide across all sessions, sort of like an in-memory cache, not backed up on a file system. I've looked at many FAQs and such, no hints so far that it is even possible. Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/ Share on other sites More sharing options...
fert Posted November 25, 2006 Share Posted November 25, 2006 the only way that i know how to do that is to use files or a database Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/#findComment-130213 Share on other sites More sharing options...
printf Posted November 25, 2006 Share Posted November 25, 2006 You can use a global cached include file via htaccess or php.ini or apache config...php.ini[code]auto_prepend_file = "path/name.php"[/code] Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/#findComment-130214 Share on other sites More sharing options...
fractz Posted November 25, 2006 Author Share Posted November 25, 2006 [quote author=printf link=topic=116290.msg473729#msg473729 date=1164487847]You can use a global cached include file via htaccess or php.ini or apache config...php.ini[code]auto_prepend_file = "path/name.php"[/code][/quote]Great! Would it be too much to ask for the code needed in htaccess and httpd.conf? Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/#findComment-130221 Share on other sites More sharing options...
printf Posted November 25, 2006 Share Posted November 25, 2006 same difference for htaccess and apache// htaccess[code]php_value auto_prepend_file '/path/name.php'[/code]// apache[code]php_value auto_prepend_file "/path/name.php"[/code]printf Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/#findComment-130222 Share on other sites More sharing options...
printf Posted November 25, 2006 Share Posted November 25, 2006 If you want just for certain domains, include it in your [b]virtual host[/b] declaration in your apache config file, if you don't it will be global across the complete server for every call that PHP handles!printf Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/#findComment-130225 Share on other sites More sharing options...
fractz Posted November 25, 2006 Author Share Posted November 25, 2006 [quote author=printf link=topic=116290.msg473740#msg473740 date=1164488986]If you want just for certain domains, include it in your [b]virtual host[/b] declaration in your apache config file, if you don't it will be global across the complete server for every call that PHP handles!printf[/quote]Thanks! Much appreciated. Link to comment https://forums.phpfreaks.com/topic/28460-newbie-question-on-persistent-data/#findComment-130233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.