Posts tagged with PHP

Once PHP is installed, but new extention is required, it is always recommended to run the following, take ldap for example,

cd ext/
cd ldap/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install

then all is done.

Config opcache for php8 to ensure the maximum performance of your server, after you have installed it, config like the following,

Your php.ini file should contain the following directives:

zend_extension=opcache.so

opcache.enable=1
opcache.enable_cli=1
opcache.jit_buffer_size=500000000
opcache.jit=1235
opcache.revalidate_freq=0
opcache.validate_timestamps=1
opcache.max_accelerated_files=10000
opcache.memory_consumption=192
opcache.max_wasted_percentage=10
opcache.interned_strings_buffer=16
opcache.fast_shutdown=1

ref https://medium.com/@edouard.courty/make-your-php-8-apps-twice-as-fast-opcache-jit-8d3542276595

After upgrading the system to Unbuntu update to 22.04, php-fpm can not start, with error

error while loading shared libraries: libwebp.so.6

It seems the shared library is missing. Then just find the current libwebp.so in your system,

find / libwebp.so
/usr/lib/x86_64-linux-gnu/libwebp.so
/usr/lib/x86_64-linux-gnu/libwebp.so.7

I just copy libwebp.so to libwebp.so.6, then problem solved.