WAIMAOZHAN - 2023 - 12
type: channel
link: https://waimaozhan.cn/2023/12/
description: Your description here.
items: Install new extension after php was installed
items: opcache for PHP 8
items: Drupal to organize all modules under the /modules/contrib directory

Install new extension after php was installed
type: item
date: 2023-12-27T14:28:00+08:00
description: 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.

opcache for PHP 8
type: item
date: 2023-12-13T11:20:23+08:00
description: 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

Drupal to organize all modules under the /modules/contrib directory
type: item
date: 2023-12-11T10:40:18+08:00
description: Sometimes when we update the drupal major version from 8.x to 9.x or even to 10.x, we will have problems with the modules, for example, there might be multiple installations of the single module, that is, you wil find the modules in two directories,/modules/modulename /modules/contrib/modulename This is because the old module is installed manually and the contrib/ is installed by composer, to solve the problem, you have to do the following,remove the /modules/modulename and runvendor/bin/drush crto rebuild the cache registry, this will ensure the module is actually called from /modules/contrib/modulename.Incase your module is not found in the /modules/contrib directory, you will need to runcomposer require drupal/modulename and then remove the module/modulename, run drush cr again.