WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] eAccelerator installed but not showing in dropdown (21 posts)

  1. zestylemon
    Member
    Posted 4 years ago #

    I've installed the plugin and all looks good so far. I have my own server running WHM & Cpanel so I installed eAccelerator but the plugin doesn't allow me to select it on the option page. Only the 'shared server disk' options are available to me. PHPinfo confirms eAccelerator is installed / available:

    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.3.0, with eAccelerator v0.9.6.1, eAccelerator, with the ionCube PHP Loader v3.3.20

    Any pointers or URLs of discussion threads I should look at are most appreciated.

  2. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Unfortunately I see this a lot. eAccelerator behaves very differently on every server I've seen and many have trouble getting it running. The way W3TC works is it tries to call one of the functions used to save data in eAccelerator and if that call fails, it disables the option. So, there is an issue with the installation because all W3TC tries to do is start caching things and the call failed. If it eAccelerator worked you could simply refresh the General Settings page and see it working. Ask your host to prove to you that it is working by getting the control panel page going etc.

  3. zestylemon
    Member
    Posted 4 years ago #

    Last night I tried installing ACP (I'm not a linux guru) and didn't get anywhere. I noticed eAccelerator as one of the options in WHM so thought I'd give it a go this morning and went through the process of compiling it (using WHM eather than command line).

    Only once it had finished did I notice that you provide step by step instructions under the 'Installation' link on the plugin page.

    It probably makes sense to recompile Apache without eAccelerator and then follow your instructions to see if I can get ACP installed. ACP seems to be optioned mentioned by so many so it seems I should go 'the ACP route'. Just started recompiling now so hopefully it doesn't take too long.

    Thanks for your help so far.

  4. @zestylemon
    The eaccelerator version that comes with whm/cpanel is 0.9.6 which does not support opcode caching. If you want to use eaccel with w3 you have to use 0.9.5.3

    To get APC to work with WHM/Cpanel make sure you disable the Zend optimizer by commenting it out in your php.ini

    Also after you finish compiling choose the DSO or Fast-CG
    I option without suexec or suPHP.

    I had a lot of problems getting APC to work on one of my servers that has WHM/Cpanel. But I finally fixed it and it runs great even before activating w3 total. If you get internal server errors just go back into php.ini and comment out exentension=apc.so restart apache and adjust your settings till you get it right.

  5. zestylemon
    Member
    Posted 4 years ago #

    (Only after posting this have I spotted c3mdigital's post)

    Several hours on and sadly I don't seem to be getting anywhere.

    Under the 'server preparation' section:
    # yum install php-pear
    # yum install php-devel
    # yum install httpd-devel
    Each of these return a 'No package xxx available' message (where xxx = php-pear etc).
    WHM reports that Pear 1.9.1 is an already installed module.

    # yum install gcc make
    # yum install zlib-devel
    These are both apparently up to date.

    Your instructions continue with a number of sections:
    Memcached (Daemon) Installation
    PECL Memcache Module Installation
    PECL Alternative PHP Cache (APC) Installation (Recommended)
    XCache Installation

    Am I correct to assume I choose 1 of these?

    I've tried following the instructions for PECL APC but get nowhere.
    running: pecl install apc
    returns the following:

    # pecl install apc
    downloading APC-3.0.19.tgz ...
    Starting to download APC-3.0.19.tgz (115,735 bytes)
    .........................done: 115,735 bytes
    47 source files, building
    running: phpize
    Configuring for:
    PHP Api Version: 20090626
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626
    Use apxs to set compile flags (if using APC with Apache)? [yes] : yes
    building in /var/tmp/pear-build-root/APC-3.0.19
    running: /root/tmp/pear/APC/configure --with-apxs
    checking for egrep... grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking for cc... cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    ERROR: `/root/tmp/pear/APC/configure --with-apxs' failed
    root@host01 [/]#

    I've done a lot of googling on various error messages and tried some of the reccomendations I've come across. None of it seems to be of help, just scared now that I've going to do more harm than good.

  6. zestylemon
    Member
    Posted 4 years ago #

    @c3mdigital I've commented out Zend in php.ini. I've
    DSO is selected
    suexec / suPHP is 'no'

    I assume I need to recompile Apache - starting that now.

  7. zestylemon
    Member
    Posted 4 years ago #

    Now that I've recompiled Apache this line has been re-added to php.ini
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3.so"

    Now that I've uncommented this line what do I need to do to get APC installed?

  8. @zesty

    You don't have to recompile Apache. If the modules are commented out then they won't load.

    You will have to follow the install instructions in the plugin to compile from source with a few changes which I will outline here.

    cd /usr/local/src && wget http://pecl.php.net/get/APC-3.0.19.tgz && tar -xzf APC-3.0.19.tgz && cd APC-3.0.19

    Now you will have APC downloaded untarred and you will be in the configure directory.

    phpize && ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/local/apache/bin/apxs --with-php-config=/usr/local/bin/php-config && make && make install

    This will configure APC and install it in your extension directory.

    cd /usr/local/lib/php/extensions/no-debug-non-zts-20090626

    dir

    You should see a file named apc.so in that directory

    If there are no errors listed and apc.so exist in the right directory then nano /usr/local/lib/php.ini
    you should see extension=apc.so somewhere. If not add it then copy the settings from wp-content/plugins/w3-total-cache/ini/apc.ini and add them below extension=apc.so control x and save php.ini then service httpd restart

    php -r 'phpinfo();' | grep 'apc'

    If you get output from that last command then it is installed and working and you can go to one of your web pages and make sure it loads.

    Also some good instructions for installing APC on a WHM/Cpanel server are here: http://www.brettbrewer.com/index2.php?option=com_content&do_pdf=1&id=70

  9. zestylemon
    Member
    Posted 4 years ago #

    @c3mdigital thanks for your detailed reply.

    First off, these two lines are commented out in /usr/local/lib/php.ini:
    ;zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3.so"
    ;zend_extension_ts = "/usr/local/IonCube/ioncube_loader_lin_5.2_ts.so"

    This is the php.ini file that's mentioned in the results when I run phpinfo.php in a browser.

    Even though these 2 lines are commented out phpinfo.php still makes reference to Zend. First off the Zend logo is still displayedand details the following:
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.3.0

    On the server command line when I enter 'php -v' the following is returned:
    PHP 5.3.2 (cli) (built: Jul 24 2010 21:09:53)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

    So it looks like Zend is still running. I saw in your most you mentioned "php -r 'phpinfo();' | grep 'apc'" so it tried "php -r 'phpinfo();' | grep 'zend'" and got the following back:

    php -r 'phpinfo();' | grep 'zend'
    report_zend_debug => Off => Off
    zend.enable_gc => On => On

    I'll have to Google and see if I can uncover anything on disabling Zend on WHM / Cpanel. It's late now so will pick this up again tomorrow.

  10. Zend is ok it's part of the scripting language. Zend Optimizer is what causes the problems.

    Remove the pecl install apc and try compiling from source using the instructions in my above post.

    To uninstall the pecl apc #pecl uninstall apc

  11. zestylemon
    Member
    Posted 4 years ago #

    Following on from your last post I used the command you suggested:
    # pecl uninstall apc
    pecl/apc not installed

    I then procceded with your previous instructions:
    phpize && ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/local/apache/bin/apxs --with-php-config=/usr/local/bin/php-config && make && make install

    Here's the last couple of lines of output when it terminated unexpectedly:
    creating libtool
    appending configuration tag "CXX" to libtool
    configure: creating ./config.status
    config.status: creating config.h
    config.status: config.h is unchanged
    /bin/sh /usr/local/src/APC-3.0.19/libtool --mode=compile cc -I. -I/usr/local/src/APC-3.0.19 -DPHP_ATOM_INC -I/usr/local/src/APC-3.0.19/include -I/usr/local/src/APC-3.0.19/main -I/usr/local/src/APC-3.0.19 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/APC-3.0.19/php_apc.c -o php_apc.lo
    cc -I. -I/usr/local/src/APC-3.0.19 -DPHP_ATOM_INC -I/usr/local/src/APC-3.0.19/include -I/usr/local/src/APC-3.0.19/main -I/usr/local/src/APC-3.0.19 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/APC-3.0.19/php_apc.c -fPIC -DPIC -o .libs/php_apc.o
    /usr/local/src/APC-3.0.19/php_apc.c:959: error: duplicate √Ęstatic√Ę
    make: *** [php_apc.lo] Error 1
    root@host01 [/usr/local/src/APC-3.0.19]#

    I googled on this error message. One of the discussion threads I came across someone suggested downgrading PHP 5.3.2 to 5.2.13 "because the problem is not your apache build but something to do with files being missing in 5.3 that apc needs". The person having the problem did this and was able to sucessfully install APC.

    I could recompile Apache to use PHP 5.2.14 (as 5.2.13 isn't in the WHM list (using the WHM web interface) of available versions) - is it OK to do that? I ask that as I wouldn't want to be changing to a PHP version that some might consider 'to buggy'. After having typed that I thought to have a look at http://en.wikipedia.org/wiki/PHP and see that PHP 5.2.14 and 5.3.3 to be a 'bug and security fix' release that were both released released a few days ago on 22nd July.

    PHP 5.3.3 is also available (newer than the 5.3.2 I'm currently running) - one would expect that with this being a newer version the files that APC needs won't be missing.

    Whilst I'm at it... I'm currently ruuning Apache 2.0 - should I upgarde to Apache 2.2 or stick with 2.0?

  12. PHP 5.3.3 and 5.2.14 was only released 5 days ago. My suggestion is to go with 5.2.14 and upgrade Apache to 2.2

    Make sure you delete: rm -rf /usr/local/src/APC-3.0.19 then
    whereis apc* and delete everything it finds before you try and reinstall.

    Also when you downgrade PHP it will create a new extension directory. You can delete this directory after your up and running to avoid any conflicts.

    rm -rf /usr/local/lib/php/extensions/no-debug-non-zts-20090626

    If you want to see my easyapache build file for the server I have running APC let me know and I will put in on Pastbin for you.

  13. zestylemon
    Member
    Posted 4 years ago #

    Thanks for all of your advice! :-)

    Before I start the complile I thought I'd take a look to see what's in /usr/local/lib/php/extensions/
    There's 2 directories in there:
    no-debug-non-zts-20060613/ & no-debug-non-zts-20090626/

    no-debug-non-zts-20090626/ contains eaccelerator.so* & memcache.so

    At some point in the last 2 days I managed to get Memcache working. When I recompile should I include Memcache or not?

    Your easyapache build file; yes please. I'm sure that'll come in handy.

  14. The 20090626 extension directory is for php 5.3 and the 20060613 is for php 5.2

    It wouldn't hurt to keep memcache because it does not conflict with APC then you could test each one with w3-total and what gives you the best performance. I used memcache for a while but it used to much memory. My VPS only has 768M.

    Here is the profile from my build: http://pastebin.com/yr1ywiWc

  15. zestylemon
    Member
    Posted 4 years ago #

    I've glad that I'm able to report some progress :-)

    Following your earlier instructions entered this:
    phpize && ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/local/apache/bin/apxs --with-php-config=/usr/local/bin/php-config && make && make install

    Here's the last couple of lines of output:
    Libraries have been installed in:
    /usr/local/src/APC-3.0.19/modules
    Build complete.
    Don't forget to run 'make test'.

    Following on with your instructions you said:
    This will configure APC and install it in your extension directory.
    cd /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    dir

    You should see a file named apc.so in that directory

    apc.so is not in this directory, but can confirm that it's in /usr/local/src/APC-3.0.19/modules as per the last couple of lines of output I detailed above.

    I'm not sure if this creates a problem for me or not. tT this point I've looked through the rest of your earlier instructions...
    nano /usr/local/lib/php.ini
    you should see extension=apc.so somewhere. If not add it then copy the settings from wp-content/plugins/w3-total-cache/ini/apc.ini and add them below extension=apc.so

    There's absolutley no mention of 'apc' anywhere in php.ini
    so I've added 'extension = apc.so' and the contents of the the apc.ini file you mentiond. I then restarted the httpd service.

    Going to the W3 Total Cache plugin admin... APC appears in the dropdown list. I can't believe it!! :-)

    Given the different directory name (as I mentioned above) I'm hoping that everything is working as it should be - my website is serving pages so on the surface all appears to be OK. I hope the same goes for 'under the hood'.

    You've been a massive help, I really do appreciate it!! Thanks for sticking by and offering me support and step by step instructions right to the end. It's been a massive help and I've learnt quite a bit. Thank you. A very big thank you! :-)

    Is there any kind of Dummies Guide to tweaking the APC settings in php.ini to get W3 Total Cache running at it's best?

  16. The reason it is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626 is because you downgraded php. The extension directory for your version of php will show up in your phpinfo listed under extension directory or you can do phpize and add the Zend Module Api No to the end of /usr/local/lib/php/extensions/no-debug-non-zts-xxxxxxxx.

    If you want to see how it is working move the the apc.php file from /usr/local/src/APC-3.0.10/acp.php somewhere in your /public_html and you can access it from a browser.

    Open up apc.php and change the lines at the top to set a username and password.

    defaults('ADMIN_USERNAME','apc');
    defaults('ADMIN_PASSWORD','password');

    I am glad I could help. I went through some of the same problems you did a few weeks ago and I am working on tutorial for my blog on how to install APC on a Cpanel/WHM server.

    APC on its own actually improves WordPress performance even if you don't have a caching plugin installed.

  17. zestylemon
    Member
    Posted 4 years ago #

    I haven't had a chance to act on your most recent post yet - will do that later today or tomorrow.

    I'll be sure to help spread the word and tweet the link to your tutorial when you publish it.

    I suppose now I've got something extra to think about when I next upgrade PHP. I'm thinking about my expeience where I had to downgrade PHP (due to the missing files) to get APC to work, especially as the APC setup is done after compiling Apache.

  18. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Any update?

  19. john brown
    Member
    Posted 3 years ago #

    hello to everyone;
    I read the title, but do not understand this.
    I installed eAccelerator. I get this error:
    imageshack.us/img209/3912/w3totalcacheeaccelerato.jpg

    Thank you!

  20. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Unfortunately there's a problem with the eAccelerator installation or configuration as W3TC's test command isn't able to save data, which makes the option become unavailable.

  21. john brown
    Member
    Posted 3 years ago #

    Thank you Frederick
    I solved the problem. I installed the eAccelerator according to the instructions(w3tc install menu).
    eAccelerator is working very well!
    How to install Eaccelerator

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic