HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


How to enable (memcache)

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#108058 (In Topic #21068)
Avatar

Fan in action

Arvixe suggested to enable memcache in ocPortal

This is a snippet from a support ticket with Arvixe, my hosting provider.

Arvixe Support Staff Suggestion(memcache)

By the way, memcached is running on the server at port 11211 and you may want to enable it for your site" I will need to check with the ocPortal team to find out just how to enable memcached. thx.


How do I enable memcache in ocPortal being that it "is enabled" on my server and set to port 11211?​:rockon:


Last edit: by vynum
Back to the top
 
Posted
Rating:
#108063
Avatar

Hi,

Theoretically you just need to add this to your info.php file:

Code

$SITE_INFO['use_mem_cache']='1';

This is untested I think though. We have had it in the code for a long time, but people have always used other cacheing mechanisms such as APC.

I'll run some tests myself and ensure it's working right.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108107
Avatar

Fan in action

Thanks Chris,

I read the encouraged use of AFC due to the trustworthiness you've experienced. Since memcache is already up and running on my server, I figured why not give it a shot. But if there are any hiccups, problems, poorer performance than AFC and AFC proves to be a justifiable option over memcache on a production server, then I would probably want to go with AFC.

Please let me know your test results on memcache and if you would actually use it on your own personal production server?

Thanks

vynum
Back to the top
 
Posted
Rating:
#108108
Avatar

APC :).

But no, I'm not actually saying APC is better. APC has kind of died as a project because Zend Optimizer got open sourced and merged with PHP, and things like memcached exist for the data caching. i.e. it's two functions have been replaced by other things. It's just the hosting world takes some times to catch up, and it looks like it now has.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108138
Avatar

Fan in action

Error after setting: $SITE_INFO['use_mem_cache']='1';

An error has occurred

PHP NOTICE [8] Undefined index: zone_name in sources/zones.php on line 169 (version: 9.0.19, PHP version: 5.2.17, URL: /)

Here is the stack trace:

The staff have been provided a ‘stack trace’ which may help them diagnose the problem.

Back to the top
 
Important!
Posted
Rating:
#108139
Avatar

Automated fix message

vynum said

Error after setting: $SITE_INFO['use_mem_cache']='1';

An error has occurred

PHP NOTICE [8] Undefined index: zone_name in sources/zones.php on line 169 (version: 9.0.19, PHP version: 5.2.17, URL: /)

Here is the stack trace:

The staff have been provided a ‘stack trace’ which may help them diagnose the problem.

This issue has been filed on the tracker as issue #1941, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Rating:
#108140
Avatar

I went through and did a lot of testing, and it works now. I had to make quite a few changes as we had completely forgotten to test it; memcached support came in as an undocumented feature originally.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108147
Avatar

Fan in action

Thank you Chris.

I applied hotfix: 1941

Updated info.php with the following change:
$SITE_INFO['use_mem_cache']='1';

Seems to be working fine  :)


Back to the top
 
Posted
Item has a rating of 5 (Liked by Chris GrahamLiked by KingBast)  
Rating:
#108148
Avatar

Fan in action

After installing memcache ocPortal is Blazing Fast!!!

A huge difference, not little huge, but BIG HUGE difference.

I wish I could move this fast :)
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: