Jump to content

Recommended Posts

Posted

By default, IPB will store all cached data in the database. But if you would like to take advantage of a PHP accelerator or content cache, there is support for APC, eAccelerator, Memcache, XCache or for storing data in files.

 

Admins of larger sites will likely want to take advantage of using an external cache source, but even smaller forums will certainly benefit.

 

Your first step will be be sure you have one of the PHP cache systems installed on your server. If you make the selection to use a cache sytem and the extension is not available, IPB will simply revert to the default cache store method.

 

Once you are sure you have the cache system installed, you will need to add a line to your conf_global.php file, to enable the system.

 

For APC:

 

$INFO['use_apc'] = '1';

For eAccelerator:

 

$INFO['use_eaccelerator'] = '1';

For Memcache:

 

$INFO['use_memcache'] = '1';

For XCache:

 

$INFO['use_xcache'] = '1';

For disk storage:

 

$INFO['use_diskcache'] = '1';

Once you have saved the edited conf_global.php file to your server, IPB will begin using the chosen cache method.

 

If you have more than one IPB forum installed on your server, you may need to use an identifier with the cache method you have selected. You will need to edit the ips_kernal/classCache/*.php (the file you edit will depend on the cache storage you are using) file.

 

Find this line -

 

private $identifier	= '';

Add whatever value you prefer, such as:

 

private $identifier	= 'forum1';

If you're unsure about having a PHP cache system on your server, there are a couple of methods to sort it.

 

If you're running IPB 3.0 (not sure about earlier versions, sorry), you can simply log into your Admin CP, select the Settings tab, look under System Overview and click on (PHP INFO) at PHP Version.

 

Or you can write a very short PHP file to display the information. Using a simple text editor, copy the following to the editor -

 

<?php 

phpinfo (); 

?>

Save the file as phpinfo.php and then FTP it to the root of your server. Point your browser to yourdomain.com/phpinfo.php and the information will be displayed for you.

 

/monthly_11_2009/post-113-13382266804675_thumb.png

 

As you can see in the above example, eAccelerator is installed.

 

I hope the above tips will help you find a performance improvement on your site.

phpinfo.thumb.png.48ce2804e4bcab94c7deacfc7e75a581.png

  • Like 3
Posted
As a footnote, if you create the phpinfo.php file, please remember to delete it from your server. You don't want to leave an security risks behind. ;)
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...