How to use eaccelerator or xcache with phpBB 3.07PL1

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

How to use eaccelerator or xcache with phpBB 3.07PL1

Post by GravityDK » Tue Aug 24, 2010 12:51 am

I'll edit this OP as the answers are more clear, to help others.

I am not a Linux nor PHP guy. I'm a phpBB webmaster, and need some help to trouble-shoot.
I asked my host to install eaccelerator for me, as in their opinion it was the more stable (for my environment) of the supported opcode caches. I have a VPS (cloud) with CentOS 64-bit.

I found that eaccelerator was not compiled with "eaccelerator_get/eaccelerator_put", so that needed to be done.
Also, the PHP handler needed to be changed from CGI to DSO or FCGI. DSO did not work because of a concurrency issue with v4 and v5 on the same server, so they switched to FCGI. That's working now.

We installed eaccelerator v0.9.5 because 0.9.6 or later does not support object caching and other features we want, with the get/put compiled in too.

However, now, I still get this error on my testbed (test.pwnwear.com/forum/) and do not know why.
"Could not find required extension [eaccelerator] for the ACM module eaccelerator."


This error comes out of ./includes/acm/acm_memory.php, this code starting L37.

Code: Select all

function acm_memory()
	{
		global $phpbb_root_path, $dbname, $table_prefix;

		$this->cache_dir	= $phpbb_root_path . 'cache/';
		$this->key_prefix	= substr(md5($dbname . $table_prefix), 0, 8) . '_';

		if (!isset($this->extension) || !extension_loaded($this->extension))
		{
			global $acm_type;

			trigger_error("Could not find required extension [{$this->extension}] for the ACM module $acm_type.", E_USER_ERROR);
		}

		if (isset($this->function) && !function_exists($this->function))
		{
			global $acm_type;

			trigger_error("The required function [{$this->function}] is not available for the ACM module $acm_type.", E_USER_ERROR);
		}
	}
Configuration details:
config.php line 11 says

Code: Select all

$acm_type = 'eaccelerator';
I can PM a phpinfo.php file if required.
Apache version 2.2.16
PHP version 5.2.14
MySQL version 5.0.91-community
cPanel Build 46156
Kernel version 2.6.18-164.11.1.el5
phpBB 3.07PL1 (SEO premod)

Cross-references to older posts on this topic
Last edited by GravityDK on Sun Aug 29, 2010 11:27 pm, edited 1 time in total.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10344
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by Noxwizard » Tue Aug 24, 2010 1:06 am

If extension_loaded() is failing, then PHP isn't configured to use that extension. Does it show up on your phpinfo page?
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by GravityDK » Tue Aug 24, 2010 1:12 am

I presume if I search for the word 'eaccelerator' in my phpinfo page, that == look for the extension?
If so, then answer is eaccelerator is not listed there.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10344
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by Noxwizard » Tue Aug 24, 2010 1:15 am

You would be correct. You need to enable the extension in php.ini: http://eaccelerator.net/wiki/Settings
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by GravityDK » Tue Aug 24, 2010 1:20 am

Righto, will try that and report back if no progress made.

User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by GravityDK » Wed Aug 25, 2010 9:29 am

I found a series of fatal conflicts with WordPress plugins I use on the same server, and possibly FCGI is not a good php handler for my environment either, I think it caused issues too. Hard to isolate.

I reverted, and uninstalled eaccelerator and rolled back to CGI as the PHP handler.
Will try again another day with xcache maybe, once I fully understand all its dependencies (like handlers).

User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by GravityDK » Thu Aug 26, 2010 11:29 pm

I'm going to try this again with APC actually, it is older and perhaps more likely my sysad team can work with it.
I can't see that it has prerequisites, like a certain PHP handler which eaccelerator did require; anyone know?

User avatar
d1m0
Registered User
Posts: 127
Joined: Wed Nov 25, 2009 9:20 am

Re: How to use eaccelerator with phpBB 3.07PL1

Post by d1m0 » Fri Aug 27, 2010 10:02 am

APC should work without any problems. Just make sure you don't have Zend Optimizer enabled, because APC won't work properly along with Zend Optimizer.
SiteGround Technical Support Team Member
Check out our special phpBB hosting package

User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

Re: How to use eaccelerator with phpBB 3.07PL1

Post by GravityDK » Fri Aug 27, 2010 10:33 am

I don't have Zend, so that's a plus.
I am concerned about needing to use DSO, though, since it seemed to cause some problems (not certain of that assertion).
I do know however that with eaccelerator I had trouble with Apache rewrite rules for phpBB-SEO which led to some working, some not, very odd. I expect something in eaccelerator or DSO intefered with the rewrites and am researching to try to isolate that, so I can work out if APC would have the same problem.

As aside, another alternative is memcached, but from this thread I'm concerned it doesn't actually work with phpBB.

User avatar
GravityDK
Registered User
Posts: 38
Joined: Mon Feb 22, 2010 7:11 am
Contact:

Re: How to use eaccelerator or xcache with phpBB 3.07PL1

Post by GravityDK » Sun Aug 29, 2010 11:27 pm

Update, I installed xcache and it worked immediately. No mucking around.
My forum index loads now in around 7s instead of 8.3s, quite an improvement (tested with tools.pingdom.com).

Note, I am using CGI handler for PHP.
DSO would allow xcache to also do its object caching properly, since objects would not be trashed after each execution as they are in CGI, but DSO has some security concerns in a shared environment like mine (where I have a VPS which has other tenants under my control).

I can get object caching by installing memcached, which I intend to try once I'm confident xcache has no compatibility problems with wordpress or other scripts on my system. memcached would work even with PHP handler being CGI.

xcache is not loaded as a function of Zend, either, I have xcache installed directly. First up the sysad tried installing zend, but phpBB could not see xcache as a PHP extension when it was loaded via Zend.

Locked

Return to “[3.0.x] Support Forum”