{"id":207,"date":"2024-09-06T09:01:45","date_gmt":"2024-09-06T00:01:45","guid":{"rendered":"https:\/\/shirakawa.weblike.jp\/blog-page\/?p=207"},"modified":"2025-05-05T09:01:47","modified_gmt":"2025-05-05T00:01:47","slug":"php-8-2","status":"publish","type":"post","link":"https:\/\/shirakawa.weblike.jp\/blog-page\/2024\/09\/06\/php-8-2\/","title":{"rendered":"PHP-8.2"},"content":{"rendered":"<p>\u6700\u65b0\u306eLaravel\u3092Inst\u3057\u305f\u3068\u3053\u308d\u3001<br \/>\nhttps:\/\/seesaawiki.jp\/lifewithslackzaurus_15_0\/d\/Laravel<br \/>\nCannot use laravel\/laravel&#8217;s latest version v11.1.4 as it requires php ^8.2 which is not satisfied by your platform.<br \/>\n\u3068\u8a00\u308f\u308c\u305f\u306e\u3067\u3001PHP-7.4\u304b\u3089PHP-8.2\u3078\u4e0a\u3052\u3066\u307f\u308b\u3002<br \/>\nPHP-7.4\u306f\u4ee5\u4e0b\u3067\u5165\u308c\u305f\u3002<br \/>\nhttps:\/\/seesaawiki.jp\/lifewithslackzaurus_15_0\/d\/WordPress%a4%f2%c6%fe%a4%ec%a4%eb<\/p>\n<p>slackbuild php\u3001\u3067\u30b0\u30b0\u3063\u305f\uff1a<br \/>\nhttps:\/\/slackbuilds.org\/repository\/15.0\/development\/php82\/<br \/>\nSlackBuilds\u3092\u3084\u3063\u3066\u307f\u308b\u304b\u3002<\/p>\n<p>https:\/\/slackbuilds.org\/repository\/15.0\/development\/php82\/ \u306b\u3066\u3001<br \/>\nThis script doesn&#8217;t build mod_php. You can use php-fpm or built-in development server. \u3068\u306f\u3001\u3069\u306e\u3088\u3046\u306a\u610f\u5473\u304b\uff1f<br \/>\nslackbuilds.org\u306ePHP 8.2\u306b\u95a2\u3059\u308b\u8a18\u8ff0\u300cThis script doesn&#8217;t build mod_php. You can use php-fpm or built-in development server.\u300d\u306e\u610f\u5473\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<br \/>\n\u610f\u5473\u306e\u89e3\u8aac:<br \/>\n\u30fb&#8221;This script doesn&#8217;t build mod_php&#8221;<br \/>\n\u30fb\u3053\u306e\u90e8\u5206\u306f\u3001\u300c\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306fmod_php\u3092\u30d3\u30eb\u30c9\u3057\u307e\u305b\u3093\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002mod_php\u306f\u3001Apache\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3067PHP\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u3001PHP\u30b9\u30af\u30ea\u30d7\u30c8\u304cApache\u30b5\u30fc\u30d0\u30fc\u5185\u3067\u76f4\u63a5\u51e6\u7406\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306eSlackBuild\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306fmod_php\u3092\u4f5c\u6210\u3057\u306a\u3044\u3053\u3068\u304c\u660e\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30fb&#8221;You can use php-fpm or built-in development server&#8221;<br \/>\n\u3053\u3053\u3067\u306f\u3001\u300c\u4ee3\u308f\u308a\u306bphp-fpm\u307e\u305f\u306f\u7d44\u307f\u8fbc\u307f\u306e\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002mod_php\u3092\u4f7f\u7528\u3057\u306a\u3044\u5834\u5408\u3001PHP\u3092\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3067\u5b9f\u884c\u3059\u308b\u306b\u306f\u5225\u306e\u65b9\u6cd5\u304c\u5fc5\u8981\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u63a8\u5968\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u4ee5\u4e0b\u306e2\u3064\u306e\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n1.php-fpm (PHP FastCGI Process Manager):<br \/>\nphp-fpm\u306f\u3001PHP\u30b9\u30af\u30ea\u30d7\u30c8\u3092FastCGI\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u4f7f\u7528\u3057\u3066\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u3059\u3002\u591a\u304f\u306e\u30b5\u30fc\u30d0\u30fc\uff08Nginx\u3084Apache with mod_proxy_fcgi\u306a\u3069\uff09\u3068\u9023\u643a\u3057\u3066\u4f7f\u308f\u308c\u307e\u3059\u3002php-fpm\u306f\u9ad8\u3044\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u63d0\u4f9b\u3057\u3001\u7279\u306b\u9ad8\u8ca0\u8377\u306e\u74b0\u5883\u3067\u6709\u7528\u3067\u3059\u3002<br \/>\n2.\u7d44\u307f\u8fbc\u307f\u958b\u767a\u30b5\u30fc\u30d0\u30fc (Built-in Development Server):<br \/>\nPHP\u306b\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u7c21\u5358\u306b\u8d77\u52d5\u3067\u304d\u308b\u7d44\u307f\u8fbc\u307f\u306e\u958b\u767a\u7528\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u304c\u5099\u308f\u3063\u3066\u3044\u307e\u3059\u3002php -S localhost:8000\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u3001\u8efd\u91cf\u3067\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u5411\u3051\u306e\u74b0\u5883\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u672c\u756a\u74b0\u5883\u306b\u306f\u9069\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u7c21\u5358\u306a\u958b\u767a\u3084\u30c6\u30b9\u30c8\u306b\u4fbf\u5229\u3067\u3059\u3002<br \/>\n\u8981\u7d04:<br \/>\n\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u3001SlackBuild\u30b9\u30af\u30ea\u30d7\u30c8\u3067Apache\u306emod_php\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u69cb\u7bc9\u3057\u306a\u3044\u305f\u3081\u3001PHP\u3092\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3067\u52d5\u4f5c\u3055\u305b\u308b\u306b\u306f\u3001php-fpm\u307e\u305f\u306f\u7d44\u307f\u8fbc\u307f\u306e\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u63a8\u5968\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u4ed6\u306e\u65b9\u6cd5\u3067PHP\u3092\u904b\u7528\u3059\u308b\u6e96\u5099\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>$ grep mod_php \/etc\/httpd\/httpd.conf<br \/>\nInclude \/etc\/httpd\/mod_php.conf<br \/>\n$ grep proxy_fcgi \/etc\/httpd\/httpd.conf<br \/>\n#LoadModule proxy_fcgi_module lib64\/httpd\/modules\/mod_proxy_fcgi.so<br \/>\n\u306a\u308b\u307b\u3069\u3001php-fpm\u3067\u884c\u304f\u304b\u3002configure\u3067&#8211;enable-fpm\u3057\u3066\u308b\u3057\u3002<\/p>\n<p>$ mkdir php<br \/>\n$ cd php<br \/>\n$ wget https:\/\/www.php.net\/distributions\/php-8.2.23.tar.xz<br \/>\n$ php -r &#8220;if (hash_file(&#8216;sha256&#8217;, &#8216;php-8.2.23.tar.xz&#8217;) === &#8217;81c5ae6ba44e262a076349ee54a2e468638a4571085d80bff37f6fd308e1d8d5&#8242;) { echo &#8216;txz verified&#8217;; } else { echo &#8216;corrupt&#8217;;} echo PHP_EOL;&#8221;<br \/>\ntxz verified<br \/>\n$ wget https:\/\/slackbuilds.org\/slackbuilds\/15.0\/development\/php82.tar.gz<br \/>\n$ wget https:\/\/slackbuilds.org\/slackbuilds\/15.0\/development\/php82.tar.gz.asc<br \/>\n$ gpg &#8211;verify php82.tar.gz.asc php82.tar.gz<br \/>\ngpg: \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u300c\/home\/ore\/.gnupg\u300d\u304c\u3067\u304d\u307e\u3057\u305f<br \/>\ngpg: \u65b0\u3057\u3044\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u300c\/home\/ore\/.gnupg\/gpg.conf\u300d\u304c\u3067\u304d\u307e\u3057\u305f<br \/>\ngpg: *\u8b66\u544a*: \u300c\/home\/ore\/.gnupg\/gpg.conf\u300d\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u8d77\u52d5\u3057\u3066\u3044\u308b\u9593\u3001\u6709\u52b9\u306b\u306a\u308a\u307e\u305b\u3093<br \/>\ngpg: \u9375\u30ea\u30f3\u30b0\u300c\/home\/ore\/.gnupg\/pubring.gpg\u300d\u304c\u3067\u304d\u307e\u3057\u305f<br \/>\ngpg: 2024\u5e7408\u670831\u65e5 xx\u6642yy\u5206zz\u79d2 JST\u306bDSA\u9375ID 9C7BA3B6\u3067\u65bd\u3055\u308c\u305f\u7f72\u540d<br \/>\ngpg: \u7f72\u540d\u3092\u691c\u67fb\u3067\u304d\u307e\u305b\u3093: \u516c\u958b\u9375\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093<br \/>\n$ gpg &#8211;keyserver hkp:\/\/keyserver.ubuntu.com &#8211;recv-keys 9C7BA3B6<br \/>\ngpg: \u9375\u30ea\u30f3\u30b0\u300c\/home\/ore\/.gnupg\/secring.gpg\u300d\u304c\u3067\u304d\u307e\u3057\u305f<br \/>\ngpg: \u93759C7BA3B6\u3092hkp\u304b\u3089\u30b5\u30fc\u30d0keyserver.ubuntu.com\u306b\u8981\u6c42<br \/>\ngpg: \/home\/ore\/.gnupg\/trustdb.gpg: \u4fe1\u7528\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u3067\u304d\u307e\u3057\u305f<br \/>\ngpg: \u93759C7BA3B6: \u516c\u958b\u9375&#8221;SlackBuilds.org Development Team &lt;slackbuilds-devel@slackbuilds.org&gt;&#8221;\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3057\u305f<br \/>\ngpg: \u7a76\u6975\u7684\u306b\u4fe1\u7528\u3059\u308b\u9375\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093<br \/>\ngpg: \u51e6\u7406\u6570\u306e\u5408\u8a08: 1<br \/>\ngpg: \u30a4\u30f3\u30dd\u30fc\u30c8: 1<br \/>\n$ gpg &#8211;verify php82.tar.gz.asc php82.tar.gz<br \/>\ngpg: 2024\u5e7408\u670831\u65e5 xx\u6642yy\u5206zz\u79d2 JST\u306bDSA\u9375ID 9C7BA3B6\u3067\u65bd\u3055\u308c\u305f\u7f72\u540d<br \/>\ngpg: &#8220;SlackBuilds.org Development Team &lt;slackbuilds-devel@slackbuilds.org&gt;&#8221;\u304b\u3089\u306e\u6b63\u3057\u3044\u7f72\u540d<br \/>\ngpg: *\u8b66\u544a*: \u3053\u306e\u9375\u306f\u4fe1\u7528\u3067\u304d\u308b\u7f72\u540d\u3067\u8a3c\u660e\u3055\u308c\u3066\u3044\u307e\u305b\u3093!<br \/>\ngpg: \u3053\u306e\u7f72\u540d\u304c\u6240\u6709\u8005\u306e\u3082\u306e\u304b\u3069\u3046\u304b\u306e\u691c\u8a3c\u624b\u6bb5\u304c\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u4e3b\u9375\u30d5\u30a3\u30f3\u30ac\u30fc\u30fb\u30d7\u30ea\u30f3\u30c8: D307 6BC3 E783 EE74 7F09 B8B7 0368 EF57 9C7B A3B6<br \/>\n\\<br \/>\n\u88dc\u8db3: \u516c\u958b\u9375\u304c\u898b\u3064\u304b\u3089\u3067\u306a\u3044\u5834\u5408 (ChatGPT)<br \/>\n\u3082\u3057\u516c\u958b\u9375\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u3001\u7f72\u540d\u8005\u304c\u9375\u30b5\u30fc\u30d0\u30fc\u306b\u516c\u958b\u9375\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3044\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u306f\u3001\u7f72\u540d\u8005\uff08\u4f8b\u3048\u3070SlackBuilds\u306e\u30e1\u30f3\u30c6\u30ca\u30fc\uff09\u304b\u3089\u76f4\u63a5\u516c\u958b\u9375\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n(\u307e\u3042\u3044\u3044\u3084\u3001\u30e1\u30f3\u30c9\u30af\u30b5\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u3060\u3057\u3001\u4e2d\u8eab\u898b\u306a\u304c\u3089\u5b9f\u884c\u3059\u308b\u3057)<br \/>\n$ tar xpf php82.tar.gz<\/p>\n<p>$ nvi php82.SlackBuild<br \/>\n(chown -R root:root . \u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3001\u30a8\u30e9\u30fc\u304c\u7121\u304b\u3063\u305f\u3089sudo\u3067\u5b9f\u884c\u3059\u308b)<br \/>\n\u4eca\u56de\u306fPostgreSQL\u306f\u5916\u3059\u3002\u4ee5\u4e0b\u3092\u524a\u9664\u3002<br \/>\n\\ &#8211;with-pdo-pgsql=shared,\/usr\/bin\/pg_config \\<br \/>\n\\ &#8211;with-pgsql=shared,\/usr\/bin\/pg_config \\<br \/>\n$ mv -i php82\/* .<br \/>\n$ TMP=. PKGTYPE=txz sh php82.SlackBuild<br \/>\nConfiguring extensions<br \/>\nchecking for QDBM support&#8230; no<br \/>\nconfigure: error: DBA: Could not find necessary header file(s).<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/gdbm-1.22-x86_64-1.txz<br \/>\n\u518d\u5b9f\u884c<br \/>\nchecking for gdlib &gt;= 2.1.0&#8230; no<br \/>\nconfigure: error: Package requirements (gdlib &gt;= 2.1.0) were not met:<br \/>\nPackage &#8216;libpng&#8217;, required by &#8216;gdlib&#8217;, not found<br \/>\nPackage &#8216;libjpeg&#8217;, required by &#8216;gdlib&#8217;, not found<br \/>\nPackage &#8216;libtiff-4&#8217;, required by &#8216;gdlib&#8217;, not found<br \/>\nconfigure: error: Unable to locate gmp.h<br \/>\nconfigure: error: Cannot find ldap.h<br \/>\nconfigure: error: Package requirements (libargon2) were not met:<br \/>\nconfigure: error: Package requirements (expat) were not met:<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/gd-2.3.3-x86_64-2.txz<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/libpng-1.6.37-x86_64-3.txz<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/libjpeg-turbo-2.1.2-x86_64-1.tx<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/libtiff-4.3.0-x86_64-1.txz<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/gmp-6.2.1-x86_64-3.txz<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/n\/openldap-2.4.59-x86_64-1.txz<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/argon2-20190702-x86_64-5.txz<br \/>\n$ sudo installpkg \/mnt2\/slackware64\/l\/expat-2.4.4-x86_64-1.txz<br \/>\n\u518d\u5b9f\u884c<br \/>\n(\u30ed\u30b0\u306f\u30e1\u30e2\u7701\u7565)<br \/>\nSlackware package \/tmp\/php82-8.2.23-x86_64-1_SBo.txz created.<br \/>\n$ mv -i \/tmp\/php82-8.2.23-x86_64-1_SBo.txz .<br \/>\n$ tar tvf php82-8.2.23-x86_64-1_SBo.txz | more<br \/>\n(\u7279\u306b\u554f\u984c\u7121\u3055\u305d\u3046\u3060\u3063\u305f)<br \/>\n$ rm php82-8.2.23-x86_64-1_SBo.txz<br \/>\n$ export LANG=C LC_ALL=POSIX TMPDIR=\/dev\/shm\/tmp TMP=. PKGTYPE=txz<br \/>\n$ nvi php82.SlackBuild<br \/>\n(#chown -R root:root . \u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u5916\u3057\u305f\u3002TAG\u3092\u5916\u3057\u305f\u3002\u4f55\u6545\u304bsudo\u3060\u3068\u74b0\u5883\u5909\u6570\u304c<br \/>\n\u4f1d\u308f\u3089\u306a\u304b\u3063\u305f(export\u3082\u3057\u305f)\u306e\u3067\u3001\u76f4\u63a5\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u66f8\u3044\u305f\u3002LANG=C LC_ALL=POSIX TMPDIR=\/dev\/<br \/>\nshm\/tmp TMP=. PKGTYPE=txz \u3002\u304c\u3001TMPDIR\u304c\/tmp\u306e\u307e\u307e\u3060\u3063\u305f\u3002\u4e00\u6642\u7684\u306b\u3001sudo ln -s \/dev\/shm\/tmp<br \/>\n\/tmp \u3068\u3057\u305f)<br \/>\n\u6b21\u56de\u304b\u3089\u306f\u3053\u306e\u65b9\u6cd5\u3067\u5b9f\u884c\u3059\u308b\u3002https:\/\/seesaawiki.jp\/lifewithslackzaurus_15_0\/d\/SlackBuild%a4%f2%bc%c2%b9%d4%a4%b7%a4%c6Inst%a4%b9%a4%eb%bb%fe%a4%ce%a5%e1%a5%e2<br \/>\n$ sudo .\/php82.SlackBuild<br \/>\n(\u30ed\u30b0\u306f\u30e1\u30e2\u7701\u7565)<br \/>\nSlackware package \/tmp\/php82-8.2.23-x86_64-1.txz created.<br \/>\n$ sudo mv -i \/tmp\/php82-8.2.23-x86_64-1.txz .<br \/>\n$ sudo removepkg \/var\/log\/packages\/php-7.4.27-x86_64-1<br \/>\n$ sudo installpkg .\/php82-8.2.23-x86_64-1.txz<br \/>\n$ sudo ln -s \/usr\/bin\/php-8.2 \/usr\/bin\/php<br \/>\n$ sudo nvi \/etc\/httpd\/httpd.conf<br \/>\n(#Include \/etc\/httpd\/mod_php.conf<br \/>\nLoadModule proxy_fcgi_module lib64\/httpd\/modules\/mod_proxy_fcgi.so)<br \/>\n$ sudo sh \/etc\/rc.d\/rc.httpd stop<br \/>\n$ sudo sh \/etc\/rc.d\/rc.httpd start<\/p>\n<p>https:\/\/60-nouen.com\/index.php \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001php\u304c\u51e6\u7406\u3055\u308c\u3066\u306a\u3044\u3002\u30bd\u30fc\u30b9\u304c\u8868\u793a\u3055\u308c\u308b\u3002\u3046\u307e\u304f\u3044\u3063\u3066\u306a\u3044\u3002<\/p>\n<p>\/etc\/php-fpm.d\/www.conf \u306b\u3066\u3001listen = 127.0.0.1:9000 \u3068\u306a\u3063\u3066\u3044\u308b\u304c\u3001Apache\u306e\u8a2d\u5b9a\u306b\u3066\u30ea\u30d0\u30fc\u30b9<br \/>\n\u30d7\u30ed\u30ad\u30b7 https:\/\/seesaawiki.jp\/lifewithslackzaurus_15_0\/d\/%a5%b5%a1%bc%a5%d0%a1%bc%a4%ce%a5%bb%a5%ad%a5%e5%a5%ea%a5%c6%a5%a3%a1%bc \u306e\u69d8\u306a\u8a2d\u5b9a\u3092\u3059\u308b\u306e\u304b\uff1f<br \/>\n\/etc\/php-fpm.d\/www.conf\u306e\u8a2d\u5b9a\u3067listen = 127.0.0.1:9000\u3068\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u308c\u306fPHP-FPM\uff08FastCGI Process Manager\uff09\u304c127.0.0.1:9000\u3067FastCGI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5f85\u3061\u53d7\u3051\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u3092\u5229\u7528\u3057\u3066\u3001Apache\u306fPHP-FPM\u3068\u901a\u4fe1\u3059\u308b\u305f\u3081\u306b\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\nApache\u3068PHP-FPM\u3092\u9023\u643a\u3055\u305b\u308b\u305f\u3081\u306b\u3001Apache\u306e\u8a2d\u5b9a\u306b\u306f**mod_proxy_fcgi**\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001Apache\u304b\u3089PHP-FPM\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8ee2\u9001\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u305d\u306e\u8a2d\u5b9a\u624b\u9806\u3092\u793a\u3057\u307e\u3059\u3002<br \/>\n1. mod_proxy\u304a\u3088\u3073mod_proxy_fcgi\u306e\u6709\u52b9\u5316<br \/>\n\u307e\u305a\u3001mod_proxy\u3068mod_proxy_fcgi\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u6709\u52b9\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067Apache\u306b\u3053\u308c\u3089\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3001\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<br \/>\n$ sudo a2enmod proxy proxy_fcgi<br \/>\n\u305d\u306e\u5f8c\u3001Apache\u3092\u518d\u8d77\u52d5\u3057\u3066\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<br \/>\n$ sudo systemctl restart httpd # CentOS\/RHEL<br \/>\n$ sudo systemctl restart apache2 # Ubuntu\/Debian<br \/>\n2. Apache\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6<br \/>\nApache\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff08httpd.conf\u307e\u305f\u306f\u4eee\u60f3\u30db\u30b9\u30c8\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff09\u3067\u3001PHP-FPM\u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8ee2\u9001\u3059\u308b\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001Apache\u3068PHP-FPM\u3092FastCGI\u7d4c\u7531\u3067\u9023\u643a\u3055\u305b\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u4f8b\u3067\u3059\u3002<br \/>\n\u4f8b: \/etc\/httpd\/conf.d\/php-fpm.conf (\u307e\u305f\u306f\u4eee\u60f3\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb)<br \/>\n\\&lt;VirtualHost *:80&gt;<br \/>\n\\ ServerName example.com<br \/>\n\\ DocumentRoot \/var\/www\/html<br \/>\n\\ # PHP-FPM\u3092\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066\u8a2d\u5b9a<br \/>\n\\ &lt;FilesMatch \\.php$&gt;<br \/>\n\\ SetHandler &#8220;proxy:fcgi:\/\/127.0.0.1:9000&#8221;<br \/>\n\\ &lt;\/FilesMatch&gt;<br \/>\n\\ # \u305d\u306e\u4ed6\u306e\u8a2d\u5b9a<br \/>\n\\ &lt;Directory &#8220;\/var\/www\/html&#8221;&gt;<br \/>\n\\ AllowOverride All<br \/>\n\\ Require all granted<br \/>\n\\ &lt;\/Directory&gt;<br \/>\n\\ ErrorLog ${APACHE_LOG_DIR}\/error.log<br \/>\n\\ CustomLog ${APACHE_LOG_DIR}\/access.log combined<br \/>\n\\&lt;\/VirtualHost&gt;<br \/>\n3. \u8a2d\u5b9a\u306e\u78ba\u8a8d<br \/>\n\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001Apache\u3092\u518d\u8d77\u52d5\u3057\u3066\u5909\u66f4\u3092\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<br \/>\n$ sudo systemctl restart httpd # CentOS\/RHEL<br \/>\n$ sudo systemctl restart apache2 # Ubuntu\/Debian<br \/>\n4. PHP-FPM\u306e\u52d5\u4f5c\u78ba\u8a8d<br \/>\nPHP\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001info.php\u306e\u3088\u3046\u306aPHP\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001PHP-FPM\u7d4c\u7531\u3067\u6b63\u3057\u304f\u51e6\u7406\u3055\u308c\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n\\&lt;?php<br \/>\n\\phpinfo();<br \/>\n\\?&gt;<br \/>\nhttp:\/\/example.com\/info.php\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001PHP\u306e\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u308c\u3070\u8a2d\u5b9a\u306f\u6210\u529f\u3067\u3059\u3002<br \/>\n\u307e\u3068\u3081<br \/>\n\u30fblisten = 127.0.0.1:9000 \u306f\u3001PHP-FPM\u304c127.0.0.1:9000\u3067FastCGI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5f85\u3061\u53d7\u3051\u3066\u3044\u308b\u72b6\u614b\u3067\u3059\u3002<br \/>\n\u30fbApache\u3068PHP-FPM\u3092\u9023\u643a\u3059\u308b\u306b\u306f\u3001mod_proxy_fcgi\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3001Apache\u306e\u8a2d\u5b9a\u3067PHP\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092FastCGI\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066PHP-FPM\u306b\u8ee2\u9001\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>$ sudo nvi \/etc\/httpd\/extra\/httpd-vhosts.conf<br \/>\n(\u4e0a\u306e\u3001# PHP-FPM\u3092\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066\u8a2d\u5b9a \u3092\u884c\u3063\u305f)<br \/>\n$ sudo sh \/etc\/rc.d\/rc.httpd stop<br \/>\n$ sudo sh \/etc\/rc.d\/rc.httpd start<br \/>\n(\u3053\u308c\u3067\u3082\u307e\u3060PHP\u306f\u52d5\u304b\u306a\u304b\u3063\u305f)<\/p>\n<p>php-fpm\u3092\u5229\u7528\u3059\u308b\u6642\u306f\u3001php-fpm\u7528\u306e\u30c7\u30fc\u30e2\u30f3\u304c\u52d5\u4f5c\u3057\u3066\u3044\u308b\u306e\u304b\uff1f<br \/>\n\u306f\u3044\u3001PHP-FPM\u3092\u5229\u7528\u3059\u308b\u969b\u306b\u306f\u3001PHP-FPM\u306e\u30c7\u30fc\u30e2\u30f3\u304c\u52d5\u4f5c\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002PHP-FPM\uff08FastCGI Process Manager\uff09\u306fPHP\u3092FastCGI\u7d4c\u7531\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u3042\u308a\u3001\u3053\u308c\u304c\u52d5\u4f5c\u3057\u3066\u3044\u306a\u3044\u3068Apache\u306a\u3069\u306eWeb\u30b5\u30fc\u30d0\u30fc\u304cPHP\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6b63\u3057\u304f\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\nPHP-FPM\u30c7\u30fc\u30e2\u30f3\u306e\u78ba\u8a8d\u65b9\u6cd5<br \/>\n1.PHP-FPM\u30c7\u30fc\u30e2\u30f3\u306e\u72b6\u614b\u78ba\u8a8d<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001PHP-FPM\u30c7\u30fc\u30e2\u30f3\u304c\u52d5\u4f5c\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\n$ sudo systemctl status php-fpm<br \/>\n\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308c\u3070\u3001\u51fa\u529b\u306b\u306f\u300cactive (running)\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n2.PHP-FPM\u306e\u8d77\u52d5<br \/>\n\u3082\u3057\u30c7\u30fc\u30e2\u30f3\u304c\u52d5\u4f5c\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002<br \/>\n$ sudo systemctl start php-fpm<br \/>\n3.\u81ea\u52d5\u8d77\u52d5\u306e\u8a2d\u5b9a<br \/>\n\u30b5\u30fc\u30d0\u30fc\u304c\u518d\u8d77\u52d5\u3055\u308c\u305f\u969b\u306bPHP-FPM\u304c\u81ea\u52d5\u7684\u306b\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n$ sudo systemctl enable php-fpm<br \/>\nPHP-FPM\u306e\u8a2d\u5b9a\u78ba\u8a8d<br \/>\nPHP-FPM\u306f\u901a\u5e38\u3001\/etc\/php-fpm.d\/www.conf \u3084 \/etc\/php-fpm.conf \u306a\u3069\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u3069\u306e\u30dd\u30fc\u30c8\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u4ed8\u3051\u308b\u304b\u3001\u3069\u306e\u30e6\u30fc\u30b6\u30fc\u3067\u52d5\u4f5c\u3059\u308b\u304b\u306a\u3069\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3082\u78ba\u8a8d\u3057\u3001\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>$ grep fpm \/var\/log\/packages\/php82-8.2.23-x86_64-1<br \/>\netc\/php\/8.2\/php-fpm.conf.default<br \/>\netc\/php\/8.2\/php-fpm.d\/<br \/>\netc\/php\/8.2\/php-fpm.d\/www.conf.default<br \/>\netc\/rc.d\/rc.php-fpm-8.2.new<br \/>\nusr\/man\/man8\/php-fpm-8.2.8.gz<br \/>\nusr\/sbin\/php-fpm-8.2<br \/>\n$ sudo cp -i -a \/etc\/php\/8.2\/php-fpm.d\/www.conf.default \/etc\/php\/8.2\/php-fpm.d\/www.conf<br \/>\n$ sudo cp -i -a \/etc\/php\/8.2\/php-fpm.conf.default \/etc\/php\/8.2\/php-fpm.conf<br \/>\n($ sudo cp -i -a \/etc\/php\/8.2\/php.ini-development \/etc\/php\/8.2\/php.ini \u4fdd\u7559\u3057\u305f)<br \/>\n($ sudo cp -i -a \/etc\/php\/8.2\/php.ini-production \/etc\/php\/8.2\/php.ini \u4fdd\u7559\u3057\u305f)<br \/>\n$ sudo cp -i -a \/etc\/php.ini \/etc\/php\/8.2\/ (8.2\u306e\u5927\u91cf\u306e\u8a2d\u5b9a\u3057\u76f4\u3057\u306f\u9762\u5012\u306a\u306e\u30677.4\u3092\u30b3\u30d4\u30fc)<br \/>\n$ (cd \/usr\/sbin\/; sudo ln -s php-fpm-8.2 php-fpm)<br \/>\n$ sudo sh \/etc\/rc.d\/rc.php-fpm-8.2 start<br \/>\nStarting php-fpm [06-Sep-2024 18:43:58] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library &#8216;xmlrpc&#8217; (tried: \/usr\/lib64\/php\/8.2\/extensions\/xmlrpc (\/usr\/lib64\/php\/8.2\/extensions\/xmlrpc: cannot open shared object file: No such file or directory), \/usr\/lib64\/php\/8.2\/extensions\/xmlrpc.so (\/usr\/lib64\/php\/8.2\/extensions\/xmlrpc.so: cannot open shared object file: No such file or directory)) in Unknown on line 0<br \/>\ndone<br \/>\n$ sudo nvi \/etc\/php\/8.2\/php.ini<br \/>\n(PHP-8.4\u306b\u306fxmlreader.so\u306f\u3044\u308b\u304c\u3001xmlrpc\u3082xmlreader\u3082PHP-8.4\u306e\u8a2d\u5b9a\u306b\u306f\u7121\u3044\u306e\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u305f)<br \/>\n(\u3053\u308c\u3067PHP-8.2\u306f\u52d5\u3044\u305f)<\/p>\n<p>$ sudo nvi \/etc\/php\/8.2\/php.ini<br \/>\nextension=mbstring<br \/>\nextension=exif ; Must be after mbstring as it depends on it<br \/>\nextension=mysqlnd<br \/>\nextension=mysqli<br \/>\n(\u30e1\u30fc\u30eb\u304c\u98db\u3070\u305a\u8a2d\u5b9a\u3057\u76f4\u3057\u3057\u305f\u304c\u3001\u3053\u308c\u304c\u4e3b\u56e0\u3067\u306f\u306a\u304b\u3063\u305f)<\/p>\n<p>PACKAGE DESCRIPTION:<br \/>\n# gdbm (GNU database routines)<br \/>\n# GNU dbm is a set of database routines that work similar to the<br \/>\n# standard UNIX dbm routines.<br \/>\n#<br \/>\n# gd (a graphics library)<br \/>\n# gd is a graphics library. It allows your code to quickly draw images<br \/>\n# complete with lines, arcs, text, multiple colors, cut and paste from<br \/>\n# other images, and flood fills, and write out the result as a PNG or<br \/>\n# JPEG file. This is particularly useful in web applications, where<br \/>\n# PNG and JPEG are two of the formats accepted for inline images by<br \/>\n# most browsers. The gd library was written by Thomas Boutell.<br \/>\n# Homepage: https:\/\/www.libgd.org<br \/>\n#<br \/>\n# libpng (Portable Network Graphics library)<br \/>\n# PNG (Portable Network Graphics) is an extensible file format for the<br \/>\n# lossless, portable, well-compressed storage of raster images. PNG<br \/>\n# provides a patent-free replacement for GIF and can also replace many<br \/>\n# common uses of TIFF. Indexed-color, grayscale, and truecolor images<br \/>\n# are supported, plus an optional alpha channel. Sample depths range<br \/>\n# from 1 to 16 bits.<br \/>\n#<br \/>\n# libjpeg-turbo (high-speed version of libjpeg)<br \/>\n# libjpeg-turbo is a high-speed version of libjpeg for x86 and x86-64<br \/>\n# processors which uses SIMD instructions to accelerate baseline JPEG<br \/>\n# compression and decompression. libjpeg-turbo is generally 2-4x as<br \/>\n# fast as the unmodified version of libjpeg, all else being equal.<br \/>\n# Homepage: https:\/\/libjpeg-turbo.org<br \/>\n#<br \/>\n# libtiff (a library for reading and writing TIFF files)<br \/>\n# This package provides support for the Tag Image File Format (TIFF),<br \/>\n# a widely used format for storing image data. Included is the libtiff<br \/>\n# library (for reading and writing TIFF files), and a collection of<br \/>\n# tools for working with TIFF images.<br \/>\n# Homepage: http:\/\/www.simplesystems.org\/libtiff<br \/>\n#<br \/>\n# gmp (GNU multiple precision arithmetic library)<br \/>\n# GNU MP is a library for arbitrary precision arithmetic, operating on<br \/>\n# signed integers, rational numbers, and floating point numbers. It has<br \/>\n# a rich set of functions, and the functions have a regular interface.<br \/>\n#<br \/>\n# openldap (Lightweight Directory Access Protocol)<br \/>\n# OpenLDAP is an open source implementation of the Lightweight Directory<br \/>\n# Access Protocol. LDAP is a alternative to the X.500 Directory Access<br \/>\n# Protocol (DAP). It uses the TCP\/IP stack versus the overly complex OSI<br \/>\n# stack.<br \/>\n# LDAP is often used to provide authentication (such as for email).<br \/>\n# Homepage: https:\/\/www.openldap.org\/<br \/>\n#<br \/>\n# argon2 (Argon2 password-hashing function)<br \/>\n# This is the reference C implementation of Argon2, the password-hashing<br \/>\n# function that won the Password Hashing Competition<br \/>\n# (see https:\/\/password-hashing.net).<br \/>\n# Argon2 is a password-hashing function that summarizes the state of the<br \/>\n# art in the design of memory-hard functions and can be used for<br \/>\n# credential storage, key derivation, or other applications.<br \/>\n# Homepage: https:\/\/github.com\/P-H-C\/phc-winner-argon2<br \/>\n#<br \/>\n# expat (C library for parsing XML)<br \/>\n# This is Expat, a C library for parsing XML, written by James Clark.<br \/>\n# Expat is a stream-oriented XML parser used by Python, GNOME, Xft2,<br \/>\n# and other things.<br \/>\n# Homepage: https:\/\/libexpat.github.io<br \/>\n#<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u65b0\u306eLaravel\u3092Inst\u3057\u305f\u3068\u3053\u308d\u3001 https:\/\/seesaawiki.jp\/lifewithslackzaurus_15_0\/d\/Laravel Cannot use laravel\/laravel&#038;#821 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-web-practice"],"_links":{"self":[{"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":1,"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":208,"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/posts\/207\/revisions\/208"}],"wp:attachment":[{"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shirakawa.weblike.jp\/blog-page\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}