PHP 5.5 and ZendOptimizer

Discussion in 'Install/Configuration' started by Moshe1010, Jul 31, 2013.

  1. Moshe1010

    Moshe1010 New Member

    Hello,

    I have Litespeed on PHP 5.5.1, and for some reason the Zend Optimizer opcache doesn't want to work. In PHP INFO it says:

    Opcode Caching Disabled
    Optimization Disabled
    Startup Failed Opcode Caching is only supported in Apache, ISAPI, FPM and FastCGI SAPIs

    I've tried this soultion:
    http://www.litespeedtech.com/support/forum/showpost.php?p=73045&postcount=6

    But it appears to exist already in the code. Any suggestions?

    Thanks.
  2. NiteWave

    NiteWave Administrator

    my test result is different with you, I built lsphp-5.5.1 with only "--with-litespeed" option. by default, opcache.so is built --- refer http://www.php.net/manual/en/opcache.installation.php

    then in php.ini, add one line:
    zend_extension=/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/opcache.so

    however opcache not show up in phpinfo() at all. in stderr.log:
    2013-08-01 10:53:06.898 [STDERR] Failed loading /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/opcache.so: /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/opcache.so: cannot restore segment prot after reloc: Permission denied

    after search in google, I got a workaround for it:
    # setenforce 0
    # chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t
    /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/opcache.so

    then "Zend OPcache" show up in phpinfo() page:
    Opcode Caching Up and Running
    Optimization Enabled
    Startup OK
    Shared memory model mmap
    ...

    see if it helps for you. I'm still testing it.
  3. Moshe1010

    Moshe1010 New Member

    I have 500 errors:
    This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.


    Any idea how to solve it?
    Thanks.
  4. NiteWave

    NiteWave Administrator

    this may be another issue.

    does phpinfo.php or hello.php also have 500 error?
  5. Moshe1010

    Moshe1010 New Member

    It happens only when I try to execute php extensions (installations) files. Would increasing time out from 60 to 90 or 120 in Litespeed's web console help this issue?
  6. NiteWave

    NiteWave Administrator

    yes, should help, as the error message suggests.

Share This Page