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.

OPcache issue

Discussion in 'General Discussion' started by Bashed, May 9, 2014.

  1. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    78
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Installed OPCache via PECL. I'm running PHP 5.4x

    pecl install ZendOpcache-beta

    Results:

    Code:
    running: make INSTALL_ROOT="/root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3" install
    Installing shared extensions:     /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local/lib/php/extensions/no-debug-non-zts-20100525/
    running: find "/root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3" | xargs ls -dils
    6423477   4 drwxr-xr-x 3 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3
    6423525   4 drwxr-xr-x 3 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr
    6423526   4 drwxr-xr-x 3 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local
    6423527   4 drwxr-xr-x 3 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local/lib
    6423528   4 drwxr-xr-x 3 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local/lib/php
    6423529   4 drwxr-xr-x 3 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local/lib/php/extensions
    6423530   4 drwxr-xr-x 2 root root   4096 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local/lib/php/extensions/no-debug-non-zts-20100525
    6423524 524 -rwxr-xr-x 1 root root 534951 May  9 16:00 /root/tmp/pear/pear-build-rootieRqJn/install-zendopcache-7.0.3/usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so
    
    Build process completed successfully
    Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so'
    install ok: channel://pecl.php.net/zendopcache-7.0.3
    Extension zendopcache enabled in php.ini
    Getting this error:

    Code:
        root@server [~]# php -v
        Failed loading opcache.so: opcache.so: cannot open shared object file: No such file or directory
        PHP 5.4.27 (cli) (built: May 1 2014 18:47:05)
        Copyright (c) 1997-2014 The PHP Group
        Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
        with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd., and
        with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

    Code:
     root@server [~]# ls -lh /usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so
        -rw-r--r-- 1 root root 523K May 9 16:00 /usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so
        root@server [~]# ls -lh /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
        -rwxr-xr-x 1 root root 1.1M Apr 11 15:48 /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so*
     
  2. iso99

    iso99 Well-Known Member

    Joined:
    Jan 5, 2011
    Messages:
    89
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Edit your php configuration and look for opcache.so, add the full path where your opcache.so is located
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, please check the path used for loadable extensions in your /usr/local/lib/php.ini file. Make sure the path used matches the location of the opcache.so file.

    Thank you.
     
  4. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    78
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Confused. I checked /usr/local/lib/php.ini and opcache.so is nowhere to be found. What should that line look like?

    Weird thing is, I ran this below and opcache.so was missing so I had to reinstall via pecl again, and add this line:
    zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so"

    Any idea why it was missing? Does cpanel somehow overwrite my settings?
     
    #4 Bashed, May 12, 2014
    Last edited: May 12, 2014
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page