Category: Uncategorized

  • Enable Zend OPcache in PHP

    Enable Zend OPcache in PHP

    To enable Zend OPCache in PHP, edit php.ini add following to end of the file

    zend_extension=opcache.so
    

    Now you may need to adjust some settings, in php.ini uncomment following, change values as needed.

    opcache.enable=1
    opcache.enable_cli=1
    opcache.memory_consumption=128
    opcache.max_accelerated_files=10000
    opcache.validate_timestamps=1
    opcache.revalidate_freq=10
    

    Verify it with

    [root@vps154294 php]# php -m | grep  Zend
    Zend OPcache
    [Zend Modules]
    Zend OPcache
    [root@vps154294 php]# 
    

    Restart web server. If you using php-fpm or fcgi, you need to restart the process.

    phpinfo() will show

    Zend OPcache in phpinfo

  • Install Redis PHP Module from source

    To install Redis PHP module from source, run

    cd /usr/local/src
    git clone https://github.com/phpredis/phpredis.git
    cd /usr/local/src/phpredis
    /usr/serverok/php-7.1.12/bin/phpize
    ./configure --with-php-config=/usr/serverok/php-7.1.12/bin/php-config
    make && make install
    

    Once installed, edit your php.ini file, add following below extension_dir line

    extension=redis.so
    

    Verify redis is installed with php -m

    [root@vps154294 ~]# /usr/serverok/php-7.1.12/bin/php -m | grep redis
    redis
    [root@vps154294 ~]# 
    

    Now restart web server

    service httpd restart
    

    phpinfo() will show following

    phpinfo redis

  • Reset osticket admin password

    Reset password for admin, can be used for any user, replace admin with username.

    UPDATE `ost_staff` SET `passwd` = MD5( 'newpassword' ) WHERE `username` = 'admin';
    

    See osticket