The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

eaccelerator?

Discussion in 'General Discussion' started by Secret Agent, Apr 15, 2005.

Thread Status:
Not open for further replies.
  1. Secret Agent

    Secret Agent Guest

    http://forum.ev1servers.net/showthread.php?t=23574

    Installed using instructions. I already have Zend 2.5.7 installed, so I wanted to use both together as I require Zend Optimizer for my billing system. I edited /usr/local/Zend/etc/php.ini (is this the proper php.ini file??)
    and it looks like this...please tell me if this is right

    zend_extension="/ea/eaccelerator/modules/eaccelerator.so"
    eaccelerator.shm_size="16"
    eaccelerator.cache_dir="/tmp/eaccelerator"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.check_mtime="1"
    eaccelerator.debug="0"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    eaccelerator.compress_level="9"

    ;zend_optimizer.optimization_level=15
    ;zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"

    ;Windows Extensions
    ;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
    ;

    I did not see anything of eaccelerator in phpmyinfo.php - how can I make sure this is certainly installed? I do see Zend in phpmyinfo.php

    I checked /etc/php.ini for ;Windows Extension but it wasn't there so this is the reason why I modified the other php.ini file.
     
  2. Secret Agent

    Secret Agent Guest

    Sorry to bump but anyone familiar? I'm getting no response from their forums at soundforge.

    Basically I see nothing in phpinfo.php aside Zend. I need both Zend Optimizer enabled (which I installed via /scripts/installzendopt) and eaccerlator.

    I'm just a bit confused as to which php.ini file I should have edited and if I did it correctly.

    Thank you.
     
  3. bornonline

    bornonline Well-Known Member

    Joined:
    Nov 19, 2004
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    I'm sure you did, but did you restart httpd and also make sure this is the correct path.

    zend_extension="/ea/eaccelerator/modules/eaccelerator.so"
     
  4. Secret Agent

    Secret Agent Guest

    Yes, default path it installed too and default code that I copied to the php.ini file.

    Restarted apache as well.
     
  5. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Find your php.ini path via command line: php -i | grep php.ini

    If that's correct, you may want to ensure you don't have php installed as a CGI ( phpsuexec ) as the accelerator will not work under that mode.

    Other than that, did you get any errors setting up ea ?
     
  6. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
  7. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    if you're still having problems with this, most likely you've done something wrong.
    From the shell, type php, then hit control-c .
    do an ls . If you see an error_log (don't do this in the apache directory, do it somewhere else), then go through that to see what the actual error is. Posting that error here will help.

    Most likely, you've not setup the right directory . /ea/ isn't exactly the normal directory for these things.

    Another thing to do. Consider NOT using the Zend module. EA and Zend run quite well together without any problems whatsoever, you don't NEED to load this as a zend module. An example of proper configuration would be something like:
    Code:
      extension="eaccelerator.so"
      eaccelerator.shm_size="16"
      eaccelerator.cache_dir="/tmp/eaccelerator"
      eaccelerator.enable="1"
      eaccelerator.optimizer="1"
      eaccelerator.check_mtime="1"
      eaccelerator.debug="0"
      eaccelerator.filter=""
      eaccelerator.shm_max="0"
      eaccelerator.shm_ttl="0"
      eaccelerator.shm_prune_period="0"
      eaccelerator.shm_only="0"
      eaccelerator.compress="1"
      eaccelerator.compress_level="9"
    
    [Zend]
    zend_optimizer.optimization_level=15
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.5.7
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.5.7
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so  
    
    Of course, make sure that your extension is loaded properly. I've run into numerous problems loading extensions through php myself, so I have everything going into one directory, and modified extension_dir as follows:
    Code:
    extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20041030
    
    So, with eaccelerator IN that directory, it'll work just fine
    Now, if eaccelerator is in that directory (by default it's placed there on later php installs), but you're STILL having issues, try creating a symlink from eaccelerator to eaccelerator.so, as such.
    Code:
    cd /usr/local/lib/php/extensions/no-debug-non-zts-20041030
    ln -s eaccelerator eaccelerator.so
    
    Then you should have no problems and you should (note: should) see this in your info files :)

    Btw: Make SURE you have the cache dir world writable :)
     
  8. Secret Agent

    Secret Agent Guest

    Strange. I got it working on one server but not another, same exact server config, install steps.

    root@home [~]# ls -la /ea/eaccelerator/modules/eaccelerator.so
    /bin/ls: /ea/eaccelerator/modules/eaccelerator.so: No such file or directory

    Install:

    mkdir ea
    cd ea
    wget http://cogent.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.2a.tar.gz
    tar xvzf eaccelerator-0.9.2a.tar.gz
    cd eaccelerator
    export PHP_PREFIX="/usr"
    $PHP_PREFIX/local/bin/phpize
    ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/local/bin/php-config
    make
    make install

    Edit php.ini
    Find this:

    To install as a ZEND extension:

    zend_extension="/ea/eaccelerator/modules/eaccelerator.so"
    eaccelerator.shm_size="16"
    eaccelerator.cache_dir="/tmp/eaccelerator"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.check_mtime="1"
    eaccelerator.debug="0"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    eaccelerator.compress_level="9"

    mkdir /tmp/eaccelerator
    chmod 0777 /tmp/eaccelerator
    mkdir /ea/eaccelerator/modules
    cp /root/ea/eaccelerator/modules/eaccelerator.so /ea/eaccelerator/modules
    service httpd restart

    Someone please help me out
     
  9. PvUtrix

    PvUtrix Well-Known Member

    Joined:
    Mar 12, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ekaterinburg - Russia
    cPanel Access Level:
    Root Administrator
    This might help someone...

    Eaccelerator WONT work if php is running as CGI (phpsusex uses CGI for instance)...

    You should modify the php.ini you see in phpinfo (Configuration File (php.ini) Path)
     
  10. Secret Agent

    Secret Agent Guest

    I resolved my previous problems but look here

    /tmp/eaccelerator is filling up /tmp quickly

    How do I prevent this? its about 200mb now
     
  11. Secret Agent

    Secret Agent Guest

    I added this to crontab -e but it doesn't seem to work

    0 2 * * * /usr/sbin/tmpwatch 1 -f /tmp/eaccelerator > /dev/null 2>&1
     
  12. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    Did you restart cron after adding that entry?
    /etc/init.d/crond restart

    Not certain if your syntax is correct ... may want to look at /etc/cron.daily/tmpwatch as an example.
     
  13. Secret Agent

    Secret Agent Guest

    root@server [~]# etc/init.d/crond restart
    -bash: etc/init.d/crond: No such file or directory

    No idea why
     
  14. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    Try /etc/rc.d/init.d/crond restart

    as an alternative
     
  15. Secret Agent

    Secret Agent Guest

    My /tmp/eaccelerator folder is getting full again and not cleaning itself up automatically like it should. Any ideas why? I tried adding that portion in crontab and restarting it. Its still building up .

    Install steps used:

    cd
    mkdir /ea/
    cd /ea
    wget http://easynews.dl.sourceforge.net/...or-0.9.3.tar.gz
    tar xvzf eaccelerator-0.9.3.tar.gz
    cd eaccelerator*
    export PHP_PREFIX="/usr"
    $PHP_PREFIX/local/bin/phpize
    ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/local/bin/php-config
    make
    make install

    pico /usr/local/Zend/etc/php.ini

    zend_extension="/ea/eaccelerator-0.9.3/modules/eaccelerator.so"
    eaccelerator.shm_size="32"
    eaccelerator.cache_dir="/tmp/eaccelerator"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.check_mtime="1"
    eaccelerator.debug="0"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    eaccelerator.compress_level="9"

    mkdir /tmp/eaccelerator
    chmod 0777 /tmp/eaccelerator
    service httpd restart
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I suggest you ask the module developers since this has nothing to do with cPanel.
     
Thread Status:
Not open for further replies.

Share This Page