PHP OPcacheのキャッシュサイズを確認する方法

PHP OPcacheのキャッシュサイズを確認する方法はいくつかありますが、2つほどその方法をご紹介します。
PHPスクリプトで確認するOPcacheの状態を確認するには、opca ...
PHP OPcacheのキャッシュをクリアには?

NextCloudを利用していますが、管理画面にログインにすると「OPcache のインターン化文字列バッファがほぼいっぱいです。」と表示されます。「opcache.interned_string ...
ソースからコンパイルしたPHPで、php.iniを編集しても設定が反映しない

ソースからコンパイルしたphpで、/etc/php.ini で設定を変更しても変更内容が反映しません。もちろんApacheの再起動も行っています。
PHP-FPMで処理が遅いスローログを出力する

CentOS 7からRockyLinux8に移行したサーバーでPHPの一部の処理で遅くなっているので、原因究明のためPHP-FPMの処理の遅い処理のをログに出力するようにしました
設定は、「/etc/php-fpm.d/w ...
phpで「ERROR: Unable to set php_value ‘soap.wsdl_cache_dir’」のエラー

php・php-fpmの初期設定後に、エラーログを見ると下記のエラーがでていました
# view/var/log/php-fpm/error.logERROR: Unable to set php_value 'soap.wsd ...php-fpmのログファイルのログレベルについて

古いWordpressのブログがあって使用しているプラグインが古いので「/var/log/php-fpm/www-error.log」に下記のWarningのエラーが大量に出力されていました。このWarningを出力しないようにログレ ...
CentOS 6系でPHP 7.4をソースからビルドしてインストール

古いCentOS 6.x系のサーバーがあり、最新OSに移行しなければいけないですが移行できない理由があってそのサーバーでWordPressを利用する話があって、利用するテンプレートの要件がPHP 7.4以上となっています。
r ...
永続オブジェクトキャッシュを使用してください 【WordPress】

Wordpressのヘルスチェックで下記のように「永続オブジェクトキャッシュを使用してください」と表示されます。以前は「Memcached Redux」を使ってい ...
「APCu」の有効になっているか確認する

PHPのAPCu(Alternative PHP Cache user caching)は、PHPプログラムのパフォーマンスを向上させるための仕組みの一つで、PHPコードの結果やデータをキャッシュする機能を提供します。これにより、同じ ...
PHPの警告「PHP Warning: Module “imagick” is already loaded in Unknown on line 0」

phpのバージョンを確認すると「PHP Warning: Module “imagick” is already loaded in Unknown on line 0」と渓谷メッセージが表示されていました
PHP 8.2から8.0 にダウングレード

先日、PHP 8.2「CentOS 9系でPHP 8.2を使用する」にバージョンアップしたのですが、php-zipで依存関係でエラーとなり色々とやったのですが、解消しません。
$ php -vPHP Warning: Modul ...phpMyAdminで「mysqli::real_connect(): (HY000/2002): No such file or directory」のエラー

phpMyAdminでMySQLのDBの保存場所を変更後にログインしてみると下記のように「mysqli::real_connect(): (HY000/2002): No such file or directory」とエラーが表示さ ...
オプションのモジュール intl がインストールされていないか、無効化されています【WordPress】

WordPressのサイトヘルスステータスで、「警告 オプションのモジュール intl がインストールさ ...
PHP で処理速度を表示する方法

PHPで処理で、MySQLに接続してDB更新したしている処理があって、その処理が遅い時があります。
どの処理でPHPの処理速度を遅くなっているか調査するために、PHPの処理速度を表示するようにしました。
その際のコ ...
Let’s Encryptのルート CA期限切れでPHP(file_get_contents)でエラー

10月1日になると、PHPのfile_get_contentsで、SSL通信するとエラーがでて処理ができなくなりました。PHPで指定しているUR ...