抹茶 SNS を動作させられないかと色々調べた結果、以下のパッケージ構成が推奨らしいです。
| パッケージ | バージョン | 備考 |
| 抹茶 | matcha-sns-1.3.9 | cakephp-1.3.2のパッケージも内包 |
| cakephp | 1.3.2 | matcha-sns-1.3.9を動作させるためのバージョン |
| openssl | 1.0.2 | mysql と PHP にリンクするため利用 |
| mysql | 4.X ~ 5.X | mysql-5.6.51を利用 |
| PHP | 5.2.X | PHP-5,2,17を利用 PHP 5.4 以降では CakePHP 1.3 は動作不可 PHP-5.2.17を利用 |
OpenSSL-1.0.2uのインストール
抹茶では利用しないが、MySQLとPHPでリンクするためインストールする。
OpenSSL-1.0.uのソースファイルを取得する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_0_2u/openssl-1.0.2u.tar.gz --2026-03-24 11:10:17-- https://github.com/openssl/openssl/releases/download/OpenSSL_1_0_2u/openssl-1.0.2u.tar.gz github.com (github.com) をDNSに問いあわせています... 20.27.177.113 github.com (github.com)|20.27.177.113|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 302 Found 場所: https://release-assets.githubusercontent.com/github-production-release-asset/7634677/6d9c987f-2288-418d-b8cf-8c6eb3f32c97?sp=r&sv=2018-11-09&sr=b&spr=https&se=2026-03-24T03%3A08%3A20Z&rscd=attachment%3B+filename%3Dopenssl-1.0.2u.tar.gz&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2026-03-24T02%3A08%3A01Z&ske=2026-03-24T03%3A08%3A20Z&sks=b&skv=2018-11-09&sig=a13iV3H1FDLg9xL2EmV4bEkH4iRBIyd2NLGJKVBG0ug%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc3NDMxODUxOCwibmJmIjoxNzc0MzE4MjE4LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.Cyt5IeU7iVSNjgmsulF46gj_xQvHnrFjYSKtkvdOSu8&response-content-disposition=attachment%3B%20filename%3Dopenssl-1.0.2u.tar.gz&response-content-type=application%2Foctet-stream [続く] --2026-03-24 11:10:18-- https://release-assets.githubusercontent.com/github-production-release-asset/7634677/6d9c987f-2288-418d-b8cf-8c6eb3f32c97?sp=r&sv=2018-11-09&sr=b&spr=https&se=2026-03-24T03%3A08%3A20Z&rscd=attachment%3B+filename%3Dopenssl-1.0.2u.tar.gz&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2026-03-24T02%3A08%3A01Z&ske=2026-03-24T03%3A08%3A20Z&sks=b&skv=2018-11-09&sig=a13iV3H1FDLg9xL2EmV4bEkH4iRBIyd2NLGJKVBG0ug%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc3NDMxODUxOCwibmJmIjoxNzc0MzE4MjE4LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.Cyt5IeU7iVSNjgmsulF46gj_xQvHnrFjYSKtkvdOSu8&response-content-disposition=attachment%3B%20filename%3Dopenssl-1.0.2u.tar.gz&response-content-type=application%2Foctet-stream release-assets.githubusercontent.com (release-assets.githubusercontent.com) をDNSに問いあわせています... 185.199.109.133, 185.199.110.133, 185.199.111.133, ... release-assets.githubusercontent.com (release-assets.githubusercontent.com)|185.199.109.133|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 5355412 (5.1M) [application/octet-stream] `openssl-1.0.2u.tar.gz' に保存中 openssl-1.0.2u.tar.gz 100%[==============================================================================>] 5.11M 10.5MB/s 時間 0.5s 2026-03-24 11:10:19 (10.5 MB/s) - `openssl-1.0.2u.tar.gz' へ保存完了 [5355412/5355412] # |
アーカイブを展開する。
|
1 2 3 4 5 6 7 8 9 10 11 12 |
# tar xvfz openssl-1.0.2u.tar.gz openssl-1.0.2u/ACKNOWLEDGMENTS openssl-1.0.2u/apps/ openssl-1.0.2u/apps/app_rand.c openssl-1.0.2u/apps/apps.c : openssl-1.0.2u/VMS/ucx_shr_decc_log.opt openssl-1.0.2u/VMS/ucx_shr_decc.opt openssl-1.0.2u/VMS/ucx_shr_vaxc.opt openssl-1.0.2u/VMS/VMSify-conf.pl openssl-1.0.2u/VMS/WISHLIST.TXT # |
configureを実行する
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# ./config --prefix=/usr/local/ssl-1.0.2 \ --openssldir=/usr/local/ssl-1.0.2/ssl shared zlib-dynamic \ -fPIC Operating system: aarch64-whatever-linux2 Configuring for linux-aarch64 Configuring for linux-aarch64 no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir) no-gmp [default] OPENSSL_NO_GMP (skip dir) no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir) no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5 no-libunbound [experimental] OPENSSL_NO_LIBUNBOUND (skip dir) no-md2 [default] OPENSSL_NO_MD2 (skip dir) no-rc5 [default] OPENSSL_NO_RC5 (skip dir) no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir) no-sctp [default] OPENSSL_NO_SCTP (skip dir) no-ssl-trace [default] OPENSSL_NO_SSL_TRACE (skip dir) no-ssl2 [default] OPENSSL_NO_SSL2 (skip dir) no-store [experimental] OPENSSL_NO_STORE (skip dir) no-unit-test [default] OPENSSL_NO_UNIT_TEST (skip dir) no-weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir) IsMK1MF=0 CC =gcc CFLAG =-fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM EX_LIBS =-ldl CPUID_OBJ =armcap.o arm64cpuid.o mem_clr.o BN_ASM =bn_asm.o EC_ASM = DES_ENC =des_enc.o fcrypt_b.o AES_ENC =aes_core.o aes_cbc.o aesv8-armx.o BF_ENC =bf_enc.o CAST_ENC =c_enc.o RC4_ENC =rc4_enc.o rc4_skey.o RC5_ENC =rc5_enc.o MD5_OBJ_ASM = SHA1_OBJ_ASM =sha1-armv8.o sha256-armv8.o sha512-armv8.o RMD160_OBJ_ASM= CMLL_ENC =camellia.o cmll_misc.o cmll_cbc.o MODES_OBJ =ghashv8-armx.o ENGINES_OBJ = PROCESSOR = RANLIB =/usr/bin/ranlib ARFLAGS = PERL =/usr/local/bin/perl SIXTY_FOUR_BIT_LONG mode DES_UNROLL used DES_INT used RC4 uses uchar RC4_CHUNK is unsigned long BF_PTR used created directory `include/openssl' e_os2.h => include/openssl/e_os2.h making links in crypto... make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/crypto' に入ります crypto.h => ../include/openssl/crypto.h opensslv.h => ../include/openssl/opensslv.h opensslconf.h => ../include/openssl/opensslconf.h ebcdic.h => ../include/openssl/ebcdic.h symhacks.h => ../include/openssl/symhacks.h ossl_typ.h => ../include/openssl/ossl_typ.h constant_time_test.c => ../test/constant_time_test.c making links in crypto/objects... make[2]: Entering directory '/usr/local/src/openssl/openssl-1.0.2u/crypto/objects' objects.h => ../../include/openssl/objects.h obj_mac.h => ../../include/openssl/obj_mac.h make[2]: Leaving directory '/usr/local/src/openssl/openssl-1.0.2u/crypto/objects' : making links in tools... make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/tools' に入ります make[1]: 'links' に対して行うべき事はありません. make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/tools' から出ます generating dummy tests (if needed)... make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/test' に入ります md2test.c => dummytest.c rc5test.c => dummytest.c jpaketest.c => dummytest.c make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/test' から出ます Configured for linux-aarch64. # |
makeする
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# make making all in crypto... make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/crypto' に入ります /usr/local/bin/perl ../util/mkbuildinf.pl "gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM" "linux-aarch64" >buildinf.h gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -o cryptlib.o cryptlib.c gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -o mem.o mem.c gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -o mem_dbg.o mem_dbg.c gcc -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -o fatalerrtest.o fatalerrtest.c : make[2]: Entering directory '/usr/local/src/openssl/openssl-1.0.2u/test' make[2]: Leaving directory '/usr/local/src/openssl/openssl-1.0.2u/test' gcc -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -o x509_time_test.o x509_time_test.c make[2]: Entering directory '/usr/local/src/openssl/openssl-1.0.2u/test' make[2]: Leaving directory '/usr/local/src/openssl/openssl-1.0.2u/test' gcc -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -O3 -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -o dummytest.o dummytest.c make[2]: Entering directory '/usr/local/src/openssl/openssl-1.0.2u/test' make[2]: Leaving directory '/usr/local/src/openssl/openssl-1.0.2u/test' make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/test' から出ます making all in tools... make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/tools' に入ります make[1]: 'all' に対して行うべき事はありません. make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/tools' から出ます # |
インストールする
|
1 2 3 4 5 6 7 8 9 10 11 12 |
# make install making all in crypto... make[1]: ディレクトリ '/usr/local/src/openssl/openssl-1.0.2u/crypto' に入ります making all in crypto/objects... make[2]: Entering directory '/usr/local/src/openssl/openssl-1.0.2u/crypto/objects' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/usr/local/src/openssl/openssl-1.0.2u/crypto/objects' : chmod 644 /usr/local/ssl-1.0.2/lib/pkgconfig/libssl.pc cp openssl.pc /usr/local/ssl-1.0.2/lib/pkgconfig chmod 644 /usr/local/ssl-1.0.2/lib/pkgconfig/openssl.pc # |
静的リンクの無効化する
MySQLやPHPに静的リンクがリンクされない様に無効化する
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# cd /usr/local/ssl-1.0.2/lib # # mv libcrypto.a libcrypto.a_disable # # mv libssl.a libssl.a_disable # # ls -l 合計 7612 drwxr-x--- 2 root root 4096 3月 19 19:33 engines -rw-r--r-- 1 root root 4206408 3月 19 19:33 libcrypto.a_disable lrwxrwxrwx 1 root root 18 3月 19 19:33 libcrypto.so -> libcrypto.so.1.0.0 -r-xr-xr-x 1 root root 2396808 3月 19 19:33 libcrypto.so.1.0.0 -rw-r--r-- 1 root root 734186 3月 19 19:33 libssl.a_disable lrwxrwxrwx 1 root root 15 3月 19 19:33 libssl.so -> libssl.so.1.0.0 -r-xr-xr-x 1 root root 542328 3月 19 19:33 libssl.so.1.0.0 drwxr-x--- 2 root root 4096 3月 19 19:33 pkgconfig # |
MySQL-5.6.51をインストールする
ソースファイルを取得する。
以下のURLからソースファイルを取得する。
https://downloads.mysql.com/archives/community/
ソースファイルを展開する
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[# tar xvfz mysql-5.6.51.tar.gz mysql-5.6.51/ mysql-5.6.51/BUILD/ mysql-5.6.51/BUILD/README mysql-5.6.51/BUILD/SETUP.sh mysql-5.6.51/BUILD/autorun.sh mysql-5.6.51/BUILD/build_mccge.sh mysql-5.6.51/BUILD/cmake_configure.sh mysql-5.6.51/BUILD/compile-dist mysql-5.6.51/BUILD/compile-pentium : mysql-5.6.51/zlib/zlib.pc.cmakein mysql-5.6.51/zlib/zlib.pc.in mysql-5.6.51/zlib/zlib2ansi mysql-5.6.51/zlib/zutil.c mysql-5.6.51/zlib/zutil.h mysql-5.6.51/source_downloads/ # |
configureを実行する
構築ディレクトリ作成と変数を設定してconfigureを実行する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# cd mysql-5.6.51 # # mkdir build # # cd build # # OPENSSL_ROOT=/usr/local/ssl-1.0.2 # INSTALL_PREFIX=/usr/local/mysql-5.6.51 # DATADIR="$INSTALL_PREFIX/data" # SYSCONFDIR="$INSTALL_PREFIX/etc" # SOCK="$DATADIR/mysql.sock" # # cmake .. \ -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \ -DCMAKE_CXX_FLAGS="-std=gnu++03 -fpermissive" \ -DCMAKE_C_FLAGS="-std=gnu99" \ -DMYSQL_DATADIR="$DATADIR" \ -DSYSCONFDIR="$SYSCONFDIR" \ -DMYSQL_UNIX_ADDR="$SOCK" \ -DWITH_SSL=$OPENSSL_ROOT \ -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT \ -DOPENSSL_INCLUDE_DIR=$OPENSSL_ROOT/include \ -DOPENSSL_LIBRARIES=$OPENSSL_ROOT/lib \ -DWITH_ZLIB=system \ -DZLIB_INCLUDE_DIR=/usr/include \ -DZLIB_LIBRARY=/usr/lib64/libz.so \ -DENABLED_LOCAL_INFILE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DWITH_READLINE=ON \ -DCMAKE_CXX_FLAGS="-std=gnu++03 -fpermissive" \ -DCMAKE_C_FLAGS="-std=gnu99" \ -DWITHOUT_SERVER=OFF CMake Deprecation Warning at CMakeLists.txt:23 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. CMake Deprecation Warning at CMakeLists.txt:26 (CMAKE_POLICY): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. CMake Deprecation Warning at CMakeLists.txt:31 (CMAKE_POLICY): The OLD behavior for policy CMP0018 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:37 (CMAKE_POLICY): The OLD behavior for policy CMP0022 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:45 (CMAKE_POLICY): The OLD behavior for policy CMP0026 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:46 (CMAKE_POLICY): The OLD behavior for policy CMP0045 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:47 (CMAKE_POLICY): The OLD behavior for policy CMP0042 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:60 (CMAKE_POLICY): The OLD behavior for policy CMP0075 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. -- Running cmake version 3.26.5 -- Found Git: /usr/bin/git (found version "2.47.3") -- The C compiler identification is GNU 11.5.0 -- The CXX compiler identification is GNU 11.5.0 : -- Looking for asprintf -- Looking for asprintf - found -- Check size of pthread_t -- Check size of pthread_t - done -- Using cmake version 3.26.5 -- Not building NDB -- Performing Test HAVE_PEERCRED -- Performing Test HAVE_PEERCRED - Success -- Performing Test HAVE_DEPRECATED_DECLARATIONS -- Performing Test HAVE_DEPRECATED_DECLARATIONS - Success -- Library mysqlclient depends on OSLIBS /usr/lib64/libz.so;m;/usr/local/ssl-1.0.2/lib/libssl.so;/usr/local/ssl-1.0.2/lib/libcrypto.so -- Googletest was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source. -- If you are inside a firewall, you may need to use an https proxy: export https_proxy=http://example.com:80 -- Library mysqlserver depends on OSLIBS /usr/lib64/libz.so;m;/usr/local/ssl-1.0.2/lib/libssl.so;/usr/local/ssl-1.0.2/lib/libcrypto.so;crypt CMake Deprecation Warning at scripts/CMakeLists.txt:288 (CMAKE_POLICY): The OLD behavior for policy CMP0007 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. -- Skipping deb packaging on unsupported platform . -- CMAKE_BUILD_TYPE: RelWithDebInfo -- COMPILE_DEFINITIONS: _FILE_OFFSET_BITS=64;HAVE_CONFIG_H;HAVE_LIBEVENT2 -- CMAKE_C_FLAGS: -std=gnu99 -Wall -Wextra -Wformat-security -Wimplicit-fallthrough=0 -Wvla -Wwrite-strings -Wdeclaration-after-statement -Wno-cast-function-type -Wno-format-overflow -Wno-format-truncation -- CMAKE_CXX_FLAGS: -std=gnu++03 -fpermissive -Wall -Wextra -Wformat-security -Wimplicit-fallthrough=0 -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-int-in-bool-context -Wno-aligned-new -Wno-class-memaccess -Wno-cast-function-type -Wno-format-overflow -Wno-format-truncation -Wno-ignored-qualifiers -- CMAKE_C_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF -Wno-class-memaccess -Wno-deprecated-copy -- Configuring done (204.8s) CMake Warning (dev) at extra/libevent/CMakeLists.txt:826 (add_library): Policy CMP0115 is not set: Source file extensions must be explicit. Run "cmake --help-policy CMP0115" for policy details. Use the cmake_policy command to set the policy and suppress this warning. File: /usr/local/src/mysql/mysql-5.6.51/extra/libevent/evconfig-private.h.in This warning is for project developers. Use -Wno-dev to suppress it. -- Generating done (1.2s) -- Build files have been written to: /usr/local/src/mysql/mysql-5.6.51/build # |
makeする
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# make [ 0%] Built target abi_check [ 0%] Built target INFO_SRC [ 0%] Built target INFO_BIN [ 0%] Generating vi.h [ 0%] Generating common.h [ 1%] Generating emacs.h [ 1%] Generating fcns.c [ 1%] Generating fcns.h [ 1%] Generating help.c [ 1%] Generating help.h : [ 87%] Built target bug25714 [ 87%] Built target partition_embedded [ 87%] Built target sqlgunitlib [ 87%] Built target mysqld [ 88%] Built target mysql_tzinfo_to_sql [ 88%] Built target udf_example [ 88%] Built target GenYaccEmbeddedSource [100%] Built target sql_embedded [100%] Built target mysqlserver [100%] Built target mysql_embedded [100%] Built target mysqltest_embedded [100%] Built target mysql_client_test_embedded [100%] Built target my_safe_process # |
インストールする
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# make install [ 0%] Built target abi_check [ 0%] Built target INFO_SRC [ 0%] Built target INFO_BIN [ 3%] Built target edit [ 4%] Built target event_core [ 6%] Built target event_extra [ 8%] Built target event [ 11%] Built target strings [ 11%] Built target gen_dtrace_header : [100%] Built target mysql_embedded [100%] Built target mysqltest_embedded [100%] Built target mysql_client_test_embedded [100%] Built target my_safe_process Install the project... -- Install configuration: "RelWithDebInfo" -- Installing: /usr/local/mysql-5.6.51/./README -- Installing: /usr/local/mysql-5.6.51/./LICENSE -- Installing: /usr/local/mysql-5.6.51/docs/INFO_SRC -- Installing: /usr/local/mysql-5.6.51/docs/INFO_BIN -- Up-to-date: /usr/local/mysql-5.6.51/docs : -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-alter-table -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-big-tables -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-connect -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-create -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-insert -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-select -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-transactions -- Installing: /usr/local/mysql-5.6.51/sql-bench/test-wisconsin # |
環境を設定する
以下のファイルを設定すると共に、mysqlグループにnginxユーザを追加する。
・my.cnfファイル
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# cd /usr/local/mysql-5.6.51 # # cp support-files/my-default.cnf ./my.cnf # # vi my.cnf # # diff -c support-files/my-default.cnf ./my.cnf *** support-files/my-default.cnf 2026-03-19 19:49:55.000000000 +0900 --- ./my.cnf 2026-03-19 21:28:46.149759442 +0900 *************** *** 29,31 **** --- 29,57 ---- # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + + port=3307 + basedir=/usr/local/mysql-5.6.51 + datadir=/usr/local/mysql-5.6.51/data + socket=/usr/local/mysql-5.6.51/data/mysql.sock + user=mysql + pid-file=/usr/local/mysql-5.6.51/data/mysql-5.6.51.pid + log-error=/var/log/mysql/mysqld-5.6.51.log + #bind-address = :: + bind-address=127.0.0.1 + + # Disabling symbolic-links is recommended to prevent assorted security risks + symbolic-links=0 + + + [mysqld_safe] + port=3307 + basedir=/usr/local/mysql-5.6.51 + datadir=/usr/local/mysql-5.6.51/data + socket=/usr/local/mysql-5.6.51/data/mysql.sock + user=mysql + pid-file=/usr/local/mysql-5.6.51/data/mysql-5.6.51.pid + log-error=/var/log/mysql/mysqld-5.6.51.log + #bind-address = :: + bind-address=127.0.0.1 + # # cat my.cnf # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... # socket = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES port=3307 basedir=/usr/local/mysql-5.6.51 datadir=/usr/local/mysql-5.6.51/data socket=/usr/local/mysql-5.6.51/data/mysql.sock user=mysql pid-file=/usr/local/mysql-5.6.51/data/mysql-5.6.51.pid log-error=/var/log/mysql/mysqld-5.6.51.log #bind-address = :: bind-address=127.0.0.1 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] port=3307 basedir=/usr/local/mysql-5.6.51 datadir=/usr/local/mysql-5.6.51/data socket=/usr/local/mysql-5.6.51/data/mysql.sock user=mysql pid-file=/usr/local/mysql-5.6.51/data/mysql-5.6.51.pid log-error=/var/log/mysql/mysqld-5.6.51.log #bind-address = :: bind-address=127.0.0.1 # # usermod -aG mysql nginx # # grep nginx /etc/group nginx:x:990: mysql:x:27:nginx # |
データベースを初期化する
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# /usr/local/mysql-5.6.51/scripts/mysql_install_db \ --user=mysql \ --defaults-file=/usr/local/mysql-5.6.51/my.cnf \ --basedir=/usr/local/mysql-5.6.51 \ --datadir=/usr/local/mysql-5.6.51/data Installing MySQL system tables...2026-03-19 21:38:28 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2026-03-19 21:38:28 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2026-03-19 21:38:28 0 [Note] /usr/local/mysql-5.6.51/bin/mysqld (mysqld 5.6.51) starting as process 3184094 ... OK Filling help tables...2026-03-19 21:38:30 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2026-03-19 21:38:30 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2026-03-19 21:38:30 0 [Note] /usr/local/mysql-5.6.51/bin/mysqld (mysqld 5.6.51) starting as process 3184118 ... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/local/mysql-5.6.51/bin/mysqladmin -u root password 'new-password' /usr/local/mysql-5.6.51/bin/mysqladmin -u root -h raspberrypi.ksm.mydns.jp password 'new-password' Alternatively you can run: /usr/local/mysql-5.6.51/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd . ; /usr/local/mysql-5.6.51/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems at http://bugs.mysql.com/ The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com WARNING: Found existing config file /usr/local/mysql-5.6.51/my.cnf on the system. Because this file might be in use, it was not replaced, but was used in bootstrap (unless you used --defaults-file) and when you later start the server. The new default config file was created as /usr/local/mysql-5.6.51/my-new.cnf, please compare it with your file and take the changes you need. WARNING: Default config file /etc/my.cnf exists on the system This file will be read by default by the MySQL server If you do not want to use this, either remove it, or use the --defaults-file argument to mysqld_safe when starting the server # |
起動・停止シェルを作成し、起動する
support-files/mysql.serverファイルがインストールされるが、mariadb-server-10.5.29で使用する/etc/my.cnfファイルを検索してしまうため正常に起動できない。
起動・停止するシェルを作成し、起動する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# vi /etc/rc.d/mysqld-5.6.51 # # cat /etc/rc.d/mysqld-5.6.51 #/bin/bash function func_start () { pro=`ps -ef | grep -v grep | grep "mysql-5.6.51" | grep -v "mysqld_safe " | grep "mysqld" | awk -F' ' '{print $2}'` if [ -n "${pro}" ]; then echo "mysql-5.6.51は既に起動しています。" exit 0 else # MySQL-5.6.51起動 /usr/local/mysql-5.6.51/bin/mysqld_safe \ --defaults-file=/usr/local/mysql-5.6.51/my.cnf \ --basedir=/usr/local/mysql-5.6.51 \ --datadir=/usr/local/mysql-5.6.51/data \ --user=mysql & # MySQL起動チェック sleep 5 pro=`ps -ef | grep -v grep | grep "mysql-5.6.51" | grep -v "mysqld_safe " | grep "mysqld" | awk -F' ' '{print $2}'` if [ -n "${pro}" ]; then echo "MySQL-5.6.51を起動しました。" exit 0 else echo "MySQL-5.6.51が起動できませんでした(異常)。" fi fi } function func_stop () { pro=`ps -ef | grep -v grep | grep "mysql-5.6.51" | grep -v "mysqld_safe " | grep "mysqld" | awk -F' ' '{print $2}'` if [ -z "${pro}" ]; then echo "mysqldは既に停止しています。" exit 0 else #$/usr/local/mysql-5.6.51/bin/mysqladmin -u root -p $ssword shutdown /usr/local/mysql-5.6.51/bin/mysqladmin -u root shutdow n echo "mysqldを停止しました。" fi } exec_option=$1 case $exec_option in start ) func_start ;; stop ) func_stop ;; restart ) func_stop func_start ;; * ) ecoho "引数が有りません(異常)。" echo $0 [start|stop|restart] ;; esac exit 0 # # chmod 755 /etc/rc.d/mysqld-5.6.51 # # /etc/rc.d/mysqld-5.6.51 start 260319 21:40:36 mysqld_safe Logging to '/var/log/mysql/mysqld-5.6.51.log'. 260319 21:40:36 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.6.51/data MySQL-5.6.51を起動しました。 # # ps -fea | grep mysql mysql 477 1 0 3月13 ? 00:04:14 /usr/libexec/mariadbd --basedir=/usr root 3184466 1 0 21:40 pts/1 00:00:00 /bin/sh /usr/local/mysql-5.6.51/bin/mysqld_safe --defaults-file=/usr/local/mysql-5.6.51/my.cnf --basedir=/usr/local/mysql-5.6.51 --datadir=/usr/local/mysql-5.6.51/data --user=mysql mysql 3184800 3184466 6 21:40 pts/1 00:00:00 /usr/local/mysql-5.6.51/bin/mysqld --defaults-file=/usr/local/mysql-5.6.51/my.cnf --basedir=/usr/local/mysql-5.6.51 --datadir=/usr/local/mysql-5.6.51/data --plugin-dir=/usr/local/mysql-5.6.51/lib/plugin --user mysql --log-error=/var/log/mysql/mysqld-5.6.51.log --pid-file=/usr/local/mysql-5.6.51/data/mysql-5.6.51.pid --socket=/usr/local/mysql-5.6.51/data/mysql.sock --port=3307 root 3184837 3143677 0 21:40 pts/1 00:00:00 grep --color=auto mysql # |
MySQL-5.6.51のmysqコマンドのalliasを作成する
mysql-5.6.51バージョンのmysqlコマンドをmysql56としてaliasを作成する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# alias mysql56='/usr/local/mysql-5.6.51/bin/mysql -P 3307 -S /usr/local/mysql-5.6.51/data/mysql.sock' # # alias alias cp='cp -i' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias mv='mv -i' alias mysql56='/usr/local/mysql-5.6.51/bin/mysql -P 3307 -S /usr/local/mysql-5.6.51/data/mysql.sock' alias rm='rm -i' alias xzegrep='xzegrep --color=auto' alias xzfgrep='xzfgrep --color=auto' alias xzgrep='xzgrep --color=auto' alias zegrep='zegrep --color=auto' alias zfgrep='zfgrep --color=auto' alias zgrep='zgrep --color=auto' # |
データベースを利用するユーザとデータベースを作成し、接続を確認する
以下の情報を登録する。
| 作成ユーザ | パスワード | 作成データベース | 備考 |
| cakephp | mypassword | cakephp | cakephpテスト用 未使用 |
| matcha | mypassword | matcha | こちらを利用 |
| – | – | – | – |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# mysql56 -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.51 Source distribution Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> mysql> CREATE USER 'cakephp'@'localhost' IDENTIFIED BY 'mypassword'; -> ; Query OK, 0 rows affected (0.00 sec) mysql> mysql> CREATE USER 'matcha'@'localhost' IDENTIFIED BY 'mypassword'; Query OK, 0 rows affected (0.00 sec) mysql> mysql> GRANT ALL PRIVILEGES ON cakephp.* TO 'cakephp'@'localhost' IDENTIFIED BY 'cakephp12345'; Query OK, 0 rows affected (0.01 sec) mysql> mysql> GRANT ALL PRIVILEGES ON matcha.* TO 'matcha'@'localhost' IDENTIFIED BY 'matcha12345'; Query OK, 0 rows affected (0.00 sec) mysql> mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> mysql> CREATE DATABASE cakephp -> DEFAULT CHARACTER SET utf8mb4 -> COLLATE utf8mb4_general_ci; Query OK, 1 row affected (0.00 sec) mysql> mysql> mysql> CREATE DATABASE matcha -> DEFAULT CHARACTER SET utf8mb4 -> COLLATE utf8mb4_general_ci; Query OK, 1 row affected (0.00 sec) mysql> mysql> commit; Query OK, 0 rows affected (0.00 sec) mysql> mysql> exit Bye [root@raspberrypi data]# [root@raspberrypi data]# mysql56 -u matcha -p -h localhost matcha Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.51 Source distribution Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> exit Bye # # mysql56 -u matcha -p -h localhost matcha Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.51 Source distribution Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> exit Bye # |
PHPでmysqlのincludeを利用できるようにする
php-5.2.17のconfigureでmysqlのinclude/mysql配下を検索するのでリンクファイルを作成する。
|
1 2 3 4 5 6 7 8 9 10 11 12 |
# mkdir -p /usr/local/mysql-5.6.51/include/mysql # # cd /usr/local/mysql-5.6.51/include # # for f in *.h; do ln -s ../$f mysql/$f done ln: シンボリックリンク 'mysql/plugin.h' の作成に失敗しました: ファイルが存在します ln: シンボリックリンク 'mysql/plugin_audit.h' の作成に失敗しました: ファイルが存在します ln: シンボリックリンク 'mysql/plugin_ftparser.h' の作成に失敗しました: ファイルが存在します ln: シンボリックリンク 'mysql/plugin_validate_password.h' の作成に失敗しました: ファイルが存在します # |
php-5.2.17をインストールする
ソースファイルを取得する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# wget https://sourceforge.net/projects/korwah/files/source/php/php-5.2.17.tar.gz/download -O php-5.2.17.tar.gz --2026-03-28 08:24:07-- https://sourceforge.net/projects/korwah/files/source/php/php-5.2.17.tar.gz/download sourceforge.net (sourceforge.net) をDNSに問いあわせています... 104.18.12.149, 104.18.13.149, 2606:4700::6812:c95, ... sourceforge.net (sourceforge.net)|104.18.12.149|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 302 Found 場所: https://downloads.sourceforge.net/project/korwah/source/php/php-5.2.17.tar.gz?ts=gAAAAABpxxGYf6Eyjfmv57ctWlVN5AJOGd-iUkjOTRoZhp8IZst4TnEP-ay9AGRAUk_SZuFjL4q3p_vd2jHocgiiFipqbgPLyw%3D%3D&use_mirror=master&r= [続く] --2026-03-28 08:24:08-- https://downloads.sourceforge.net/project/korwah/source/php/php-5.2.17.tar.gz?ts=gAAAAABpxxGYf6Eyjfmv57ctWlVN5AJOGd-iUkjOTRoZhp8IZst4TnEP-ay9AGRAUk_SZuFjL4q3p_vd2jHocgiiFipqbgPLyw%3D%3D&use_mirror=master&r= downloads.sourceforge.net (downloads.sourceforge.net) をDNSに問いあわせています... 104.18.13.149, 104.18.12.149, 2606:4700::6812:d95, ... downloads.sourceforge.net (downloads.sourceforge.net)|104.18.13.149|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 302 Found 場所: https://master.dl.sourceforge.net/project/korwah/source/php/php-5.2.17.tar.gz?viasf=1 [続く] --2026-03-28 08:24:08-- https://master.dl.sourceforge.net/project/korwah/source/php/php-5.2.17.tar.gz?viasf=1 master.dl.sourceforge.net (master.dl.sourceforge.net) をDNSに問いあわせています... 216.105.38.12 master.dl.sourceforge.net (master.dl.sourceforge.net)|216.105.38.12|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 11801597 (11M) [application/x-gzip] `php-5.2.17.tar.gz' に保存中 php-5.2.17.tar.gz 100%[=========================================================>] 11.25M 2.77MB/s 時間 6.1s 2026-03-28 08:24:15 (1.86 MB/s) - `php-5.2.17.tar.gz' へ保存完了 [11801597/11801597] # |
アーカイブを展開する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# tar xvfz php-5.2.17.tar.gz php-5.2.17/ php-5.2.17/ext/ php-5.2.17/ext/gd/ php-5.2.17/ext/gd/gd.c php-5.2.17/ext/gd/gd_ctx.c php-5.2.17/ext/gd/libgd/ php-5.2.17/ext/gd/libgd/gd.c php-5.2.17/ext/gd/libgd/gd.h php-5.2.17/ext/gd/libgd/gdtables.c php-5.2.17/ext/gd/libgd/gd_gd2.c php-5.2.17/ext/gd/libgd/gd_png.c : [php-5.2.17/php.gif [php-5.2.17/README.PARAMETER_PARSING_API [php-5.2.17/acconfig.h [php-5.2.17/README.PHP4-TO-PHP5-THIN-CHANGES [php-5.2.17/CREDITS [php-5.2.17/README.UPDATE_5_2 [php-5.2.17/README.UNIX-BUILD-SYSTEM [php-5.2.17/buildconf.bat # |
パッチを取得する。
以下のパッチを取得する。
・任意)OpenSSL 1.0.x で SSLv2 シンボルを参照しないようにする古いパッチ
・NOME のメーリングリストで配布されている互換パッチ(txtbgxGXAvz4N.txt)を取得します。
・php-buildで5.2.17にphp-fpmのパッチをあてる。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# wget -O php-5.2.17_debian_patches_disable_SSLv2_for_openssl_1_0_0.patch \ "https://bugs.php.net/patch-display.php?bug_id=54736&patch=debian_patches_disable_SSLv2_for_openssl_1_0_0.patch&revision=1305414559&download=1" --2026-03-25 11:28:06-- https://bugs.php.net/patch-display.php?bug_id=54736&patch=debian_patches_disable_SSLv2_for_openssl_1_0_0.patch&revision=1305414559&download=1 bugs.php.net (bugs.php.net) をDNSに問いあわせています... 185.85.0.29, 2a02:cb40:200::1ad bugs.php.net (bugs.php.net)|185.85.0.29|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 1809 (1.8K) [application/octet-stream] `php-5.2.17_debian_patches_disable_SSLv2_for_openssl_1_0_0.patch' に保存中 php-5.2.17_debian_patches_disable_SSLv2 100%[==============================================================================>] 1.77K --.-KB/s 時間 0s 2026-03-25 11:28:10 (7.69 MB/s) - `php-5.2.17_debian_patches_disable_SSLv2_for_openssl_1_0_0.patch' へ保存完了 [1809/1809] # # wget -O php-5.6.17_libxml29_compat.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt --2026-03-25 11:31:23-- https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt mail.gnome.org (mail.gnome.org) をDNSに問いあわせています... 79.127.235.51, 79.127.170.195, 207.211.208.174, ... mail.gnome.org (mail.gnome.org)|79.127.235.51|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 1817 (1.8K) [text/plain] `php-5.6.17_libxml29_compat.patch' に保存中 php-5.6.17_libxml29_compat.patch 100%[==============================================================================>] 1.77K --.-KB/s 時間 0s 2026-03-25 11:31:24 (8.90 MB/s) - `php-5.62.17_libxml29_compat.patch' へ保存完了 [1817/1817] # # wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz URL transformed to HTTPS due to an HSTS policy --2026-03-21 09:02:08-- https://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz php-fpm.org (php-fpm.org) をDNSに問いあわせています... 104.21.27.91, 172.67.169.24, 2606:4700:3036::ac43:a918, ... php-fpm.org (php-fpm.org)|104.21.27.91|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 201339 (197K) [application/octet-stream] `php-5.2.17-fpm-0.5.14.diff.gz.2' に保存中 php-5.2.17-fpm-0.5.14.diff.gz.2 100%[=========================================================>] 196.62K 494KB/s 時間 0.4s 2026-03-21 09:02:12 (494 KB/s) - `php-5.2.17-fpm-0.5.14.diff.gz.2' へ保存完了 [201339/201339] # |
パッチを適用する。
取得したパッチを適用する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# cd php-5.2.17 # # patch -p1 -b < ../php-5.2.17_debian_patches_disable_SSLv2_for_openssl_1_0_0.patch patching file ext/openssl/xp_ssl.c Hunk #1 succeeded at 332 (offset 4 lines). Hunk #2 succeeded at 354 (offset 4 lines). Hunk #3 succeeded at 583 (offset -50 lines). Hunk #4 succeeded at 819 (offset -98 lines). # # patch -p0 -b < ../php-5.6.17_libxml29_compat.patch patching file ext/dom/node.c Hunk #1 succeeded at 1950 (offset 55 lines). patching file ext/dom/documenttype.c Hunk #1 succeeded at 215 (offset 10 lines). patching file ext/simplexml/simplexml.c Hunk #1 succeeded at 1343 (offset -74 lines). # # gunzip -c ../php-5.2.17-fpm-0.5.14.diff.gz | patch -p1 patching file configure Hunk #7 succeeded at 110645 (offset 1324 lines). Hunk #8 succeeded at 118930 (offset 1324 lines). Hunk #9 succeeded at 119634 (offset 1324 lines). Hunk #10 succeeded at 119689 (offset 1324 lines). patching file configure.in patching file libevent/ChangeLog patching file libevent/Makefile.am patching file libevent/Makefile.in patching file libevent/README patching file libevent/aclocal.m4 patching file libevent/autogen.sh patching file libevent/buffer.c patching file libevent/compat/sys/_time.h patching file libevent/compat/sys/queue.h patching file libevent/config.h.in patching file libevent/configure patching file libevent/configure.in patching file libevent/depcomp patching file libevent/devpoll.c patching file libevent/epoll.c patching file libevent/epoll_sub.c patching file libevent/evbuffer.c patching file libevent/event-config.h patching file libevent/event-fpm.h patching file libevent/event-internal.h patching file libevent/event.3 patching file libevent/event.c patching file libevent/event.h patching file libevent/evhttp.h patching file libevent/evport.c patching file libevent/evsignal.h patching file libevent/evutil.c patching file libevent/evutil.h patching file libevent/http-internal.h patching file libevent/http.c patching file libevent/install-sh patching file libevent/kqueue.c patching file libevent/log.c patching file libevent/log.h patching file libevent/min_heap.h patching file libevent/missing patching file libevent/poll.c patching file libevent/select.c patching file libevent/signal.c patching file libevent/strlcpy-internal.h patching file libevent/strlcpy.c patching file main/php_config.h.in patching file sapi/cgi/Makefile.frag patching file sapi/cgi/cgi_main.c patching file sapi/cgi/config9.m4 patching file sapi/cgi/fastcgi.c patching file sapi/cgi/fastcgi.h patching file sapi/cgi/fpm/Makefile.frag patching file sapi/cgi/fpm/acinclude.m4 patching file sapi/cgi/fpm/conf/php-fpm.conf.in patching file sapi/cgi/fpm/config.m4 patching file sapi/cgi/fpm/fpm.c patching file sapi/cgi/fpm/fpm.h patching file sapi/cgi/fpm/fpm_arrays.h patching file sapi/cgi/fpm/fpm_atomic.h patching file sapi/cgi/fpm/fpm_autoconf.h.in patching file sapi/cgi/fpm/fpm_children.c patching file sapi/cgi/fpm/fpm_children.h patching file sapi/cgi/fpm/fpm_cleanup.c patching file sapi/cgi/fpm/fpm_cleanup.h patching file sapi/cgi/fpm/fpm_clock.c patching file sapi/cgi/fpm/fpm_clock.h patching file sapi/cgi/fpm/fpm_conf.c patching file sapi/cgi/fpm/fpm_conf.h patching file sapi/cgi/fpm/fpm_config.h patching file sapi/cgi/fpm/fpm_env.c patching file sapi/cgi/fpm/fpm_env.h patching file sapi/cgi/fpm/fpm_events.c patching file sapi/cgi/fpm/fpm_events.h patching file sapi/cgi/fpm/fpm_php.c patching file sapi/cgi/fpm/fpm_php.h patching file sapi/cgi/fpm/fpm_php_trace.c patching file sapi/cgi/fpm/fpm_php_trace.h patching file sapi/cgi/fpm/fpm_process_ctl.c patching file sapi/cgi/fpm/fpm_process_ctl.h patching file sapi/cgi/fpm/fpm_request.c patching file sapi/cgi/fpm/fpm_request.h patching file sapi/cgi/fpm/fpm_shm.c patching file sapi/cgi/fpm/fpm_shm.h patching file sapi/cgi/fpm/fpm_shm_slots.c patching file sapi/cgi/fpm/fpm_shm_slots.h patching file sapi/cgi/fpm/fpm_signals.c patching file sapi/cgi/fpm/fpm_signals.h patching file sapi/cgi/fpm/fpm_sockets.c patching file sapi/cgi/fpm/fpm_sockets.h patching file sapi/cgi/fpm/fpm_stdio.c patching file sapi/cgi/fpm/fpm_stdio.h patching file sapi/cgi/fpm/fpm_str.h patching file sapi/cgi/fpm/fpm_trace.c patching file sapi/cgi/fpm/fpm_trace.h patching file sapi/cgi/fpm/fpm_trace_mach.c patching file sapi/cgi/fpm/fpm_trace_pread.c patching file sapi/cgi/fpm/fpm_trace_ptrace.c patching file sapi/cgi/fpm/fpm_unix.c patching file sapi/cgi/fpm/fpm_unix.h patching file sapi/cgi/fpm/fpm_worker_pool.c patching file sapi/cgi/fpm/fpm_worker_pool.h patching file sapi/cgi/fpm/init.d/php-fpm.in patching file sapi/cgi/fpm/xml_config.c patching file sapi/cgi/fpm/xml_config.h patching file sapi/cgi/fpm/zlog.c patching file sapi/cgi/fpm/zlog.h # |
aarch64を認識させる様に修正する。
Raspberry Pi 4(aarch64)を認識できないため、ファイルを修正する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# cp -p sapi/cgi/fpm/fpm_atomic.h sapi/cgi/fpm/fpm_atomic.h_org # # vi sapi/cgi/fpm/fpm_atomic.h # # diff -c sapi/cgi/fpm/fpm_atomic.h_org sapi/cgi/fpm/fpm_atomic.h *** sapi/cgi/fpm/fpm_atomic.h_org 2026-03-21 09:03:19.099340787 +0900 --- sapi/cgi/fpm/fpm_atomic.h 2026-03-21 09:55:04.425340191 +0900 *************** *** 57,62 **** --- 57,96 ---- return res; } + #elif defined(__aarch64__) + /* AArch64 (ARM64) 用: GCC の __sync 内蔵原子操作を使用 */ + typedef int64_t atomic_int_t; + typedef uint64_t atomic_uint_t; + typedef volatile atomic_uint_t atomic_t; + + static inline atomic_int_t atomic_fetch_add(atomic_t *value, atomic_int_t add) + { + /* 以前の値を返す(x86 の xadd と同等の振る舞い) */ + return __sync_fetch_and_add(value, add); + } + + static inline atomic_uint_t atomic_cmp_set(atomic_t *lock, atomic_uint_t old, atomic_uint_t set) + { + /* 成功で非0、失敗で0(x86 実装と同じ論理) */ + return __sync_bool_compare_and_swap(lock, old, set); + } + + #elif defined(__arm__) + /* 32-bit ARM 用: GCC の __sync 内蔵原子操作を使用 */ + typedef int32_t atomic_int_t; + typedef uint32_t atomic_uint_t; + typedef volatile atomic_uint_t atomic_t; + + static inline atomic_int_t atomic_fetch_add(atomic_t *value, atomic_int_t add) + { + return __sync_fetch_and_add(value, add); + } + + static inline atomic_uint_t atomic_cmp_set(atomic_t *lock, atomic_uint_t old, atomic_uint_t set) + { + return __sync_bool_compare_and_swap(lock, old, set); + } + #else #error unsupported processor. please write a patch and send it to me # |
configureを実行する環境ファイルを上書きする。
aarch64に対応していないため以下のファイルを最新版で上書きする。
・config.guess
・config.sub
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# wget -O config.guess \ 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' --2026-03-25 12:03:41-- https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD git.savannah.gnu.org (git.savannah.gnu.org) をDNSに問いあわせています... 209.51.188.168, 2001:470:142::168 git.savannah.gnu.org (git.savannah.gnu.org)|209.51.188.168|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 302 Moved Temporarily 場所: https://gitweb.git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD [続く] --2026-03-25 12:03:43-- https://gitweb.git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD gitweb.git.savannah.gnu.org (gitweb.git.savannah.gnu.org) をDNSに問いあわせています... 51.255.194.124, 176.100.37.192, 176.100.37.193, ... gitweb.git.savannah.gnu.org (gitweb.git.savannah.gnu.org)|51.255.194.124|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 特定できません [text/plain] `config.guess' に保存中 config.guess [ <=> ] 49.66K 91.1KB/s 時間 0.5s 2026-03-25 12:03:45 (91.1 KB/s) - `config.guess' へ保存終了 [50850] # # wget -O config.sub \ 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' --2026-03-25 12:04:03-- https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD git.savannah.gnu.org (git.savannah.gnu.org) をDNSに問いあわせています... 209.51.188.168, 2001:470:142::168 git.savannah.gnu.org (git.savannah.gnu.org)|209.51.188.168|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 302 Moved Temporarily 場所: https://gitweb.git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD [続く] --2026-03-25 12:04:04-- https://gitweb.git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD gitweb.git.savannah.gnu.org (gitweb.git.savannah.gnu.org) をDNSに問いあわせています... 15.204.88.113, 51.255.194.124, 38.102.85.135, ... gitweb.git.savannah.gnu.org (gitweb.git.savannah.gnu.org)|15.204.88.113|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 特定できません [text/plain] `config.sub' に保存中 config.sub [ <=> ] 39.01K 100KB/s 時間 0.4s 2026-03-25 12:04:05 (100 KB/s) - `config.sub' へ保存終了 [39943] # |
環境変数を設定して、configureを実行する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# export ac_cv_func_strerror=yes # # export CPPFLAGS="-I/usr/local/include \ -I/usr/local/mysql-5.6.51/include\ -I/usr/include/lib \ " # # export CFLAGS="-O2 -fcommon" # # export LDFLAGS="-L/usr/local/mysql-5.6.51/lib \ -Wl,-rpath,/usr/local/mysql-5.6.51/lib \ -L/usr/local/lib \ " # # export LIBS="-liconv $LIBS" # # ./configure \ --prefix=/usr/local/php-5.2.17 \ --with-config-file-path=/usr/local/php-5.2.17/etc \ --with-config-file-scan-dir=/usr/local/php-5.2.17/etc/conf.d \ --enable-cli \ --enable-cgi \ --with-openssl=/usr/local/ssl-1.0.2 \ --with-zlib \ --with-mysql=/usr/local/mysql-5.6.51 \ --with-mysqli=/usr/local/mysql-5.6.51/bin/mysql_config \ --with-pdo-mysql=/usr/local/mysql-5.6.51 \ --with-pdo-pgsql=/usr \ --with-pgsql=/usr \ --enable-mbstring \ --enable-mbregex \ --with-iconv=/usr/local \ --with-libdir=lib \ --enable-fastcgi \ --enable-fpm \ --disable-sysvmsg \ --disable-sysvsem \ --disable-sysvshm creating cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc -O2 -fcommon -L/usr/local/ssl-1.0.2/lib -L/usr/local/mysql-5.6.51/lib -Wl,-rpath,/usr/local/ssl-1.0.2/lib -Wl,-rpath,/usr/local/mysql-5.6.51/lib -L/usr/local/lib ) works... yes checking whether the C compiler (gcc -O2 -fcommon -L/usr/local/ssl-1.0.2/lib -L/usr/local/mysql-5.6.51/lib -Wl,-rpath,/usr/local/ssl-1.0.2/lib -Wl,-rpath,/usr/local/mysql-5.6.51/lib -L/usr/local/lib ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for icc... no checking for suncc... no checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no : checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes creating libtool appending configuration tag "CXX" to libtool Generating files updating cache ./config.cache creating ./config.status creating php5.spec creating main/build-defs.h creating scripts/phpize creating scripts/man1/phpize.1 creating scripts/php-config creating scripts/man1/php-config.1 creating sapi/cli/php.1 creating sapi/cgi/fpm/fpm_autoconf.h creating sapi/cgi/fpm/php-fpm.conf creating sapi/cgi/fpm/php-fpm creating main/php_config.h creating main/internal_functions.c creating main/internal_functions_cli.c +--------------------------------------------------------------------+ | *** WARNING *** | | | | You will be compiling the CGI version of PHP without any | | redirection checking. By putting this cgi binary somewhere in | | your web space, users may be able to circumvent existing .htaccess | | security by loading files directly through the parser. See | | http://www.php.net/manual/security.php for more details. | +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. # |
makeする。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# make /bin/sh /usr/local/src/php/php-5.2.17_zip_source/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/usr/local/src/php/php-5.2.17_zip_source/ext/date/ -DPHP_ATOM_INC -I/usr/local/src/php/php-5.2.17_zip_source/include -I/usr/local/src/php/php-5.2.17_zip_source/main -I/usr/local/src/php/php-5.2.17_zip_source -I/usr/local/src/php/php-5.2.17_zip_source/ext/date/lib -I/usr/include/libxml2 -I/usr/local/ssl-1.0.2/include -I/usr/local/include -I/usr/local/mysql-5.6.51/include -I/usr/local/src/php/php-5.2.17_zip_source/TSRM -I/usr/local/src/php/php-5.2.17_zip_source/Zend -I/usr/local/ssl-1.0.2/include -I/usr/local/include -I/usr/local/mysql-5.6.51/include -I/usr/local/include -O2 -fcommon -c /usr/local/src/php/php-5.2.17_zip_source/ext/date/php_date.c -o ext/date/php_date.lo /bin/sh /usr/local/src/php/php-5.2.17_zip_source/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/usr/local/src/php/php-5.2.17_zip_source/ext/date/ -DPHP_ATOM_INC -I/usr/local/src/php/php-5.2.17_zip_source/include -I/usr/local/src/php/php-5.2.17_zip_source/main -I/usr/local/src/php/php-5.2.17_zip_source -I/usr/local/src/php/php-5.2.17_zip_source/ext/date/lib -I/usr/include/libxml2 -I/usr/local/ssl-1.0.2/include -I/usr/local/include -I/usr/local/mysql-5.6.51/include -I/usr/local/src/php/php-5.2.17_zip_source/TSRM -I/usr/local/src/php/php-5.2.17_zip_source/Zend -I/usr/local/ssl-1.0.2/include -I/usr/local/include -I/usr/local/mysql-5.6.51/include -I/usr/local/include -O2 -fcommon -c /usr/local/src/php/php-5.2.17_zip_source/ext/date/lib/astro.c -o ext/date/lib/astro.lo /bin/sh /usr/local/src/php/php-5.2.17_zip_source/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/usr/local/src/php/php-5.2.17_zip_source/ext/date/ -DPHP_ATOM_INC -I/usr/local/src/php/php-5.2.17_zip_source/include -I/usr/local/src/php/php-5.2.17_zip_source/main -I/usr/local/src/php/php-5.2.17_zip_source -I/usr/local/src/php/php-5.2.17_zip_source/ext/date/lib -I/usr/include/libxml2 -I/usr/local/ssl-1.0.2/include -I/usr/local/include -I/usr/local/mysql-5.6.51/include -I/usr/local/src/php/php-5.2.17_zip_source/TSRM -I/usr/local/src/php/php-5.2.17_zip_source/Zend -I/usr/local/ssl-1.0.2/include -I/usr/local/include -I/usr/local/mysql-5.6.51/include -I/usr/local/include -O2 -fcommon -c /usr/local/src/php/php-5.2.17_zip_source/ext/date/lib/dow.c -o ext/date/lib/dow.lo : /bin/sh /usr/local/src/php/php-5.2.17_zip_source/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -I/usr/local/include -O2 -fcommon -L/usr/local/ssl-1.0.2/lib -L/usr/local/lib -L/usr/local/mysql-5.6.51/lib -L/usr/lib64 -L/usr/local/ssl-1.0.2//lib -L/usr/local/mysql-5.6.5/lib -Wl,-rpath,/usr/local/ssl-1.0.2//lib/lib -Wl,-rpath,/usr/local/mysql-5.6.5/lib -L/usr/local/lib -R /usr/local/ssl-1.0.2/lib -R /usr/local/lib -R /usr/local/mysql-5.6.51/lib -R /usr/lib64 ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo ext/date/lib/unixtime2tm.lo ext/libxml/libxml.lo ext/openssl/openssl.lo ext/openssl/xp_ssl.lo ext/pcre/pcrelib/pcre_chartables.lo ext/pcre/pcrelib/pcre_ucd.lo ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo ext/pcre/pcrelib/pcre_exec.lo ext/pcre/pcrelib/pcre_fullinfo.lo ext/pcre/pcrelib/pcre_get.lo ext/pcre/pcrelib/pcre_globals.lo ext/pcre/pcrelib/pcre_info.lo ext/pcre/pcrelib/pcre_maketables.lo ext/pcre/pcrelib/pcre_newline.lo ext/pcre/pcrelib/pcre_ord2utf8.lo ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_try_flipped.lo ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/zlib/zlib_filter.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/filter/filter.lo ext/filter/sanitizing_filters.lo ext/filter/logical_filters.lo ext/filter/callback_filter.lo ext/hash/hash.lo ext/hash/hash_md.lo ext/hash/hash_sha.lo ext/hash/hash_ripemd.lo ext/hash/hash_haval.lo ext/hash/hash_tiger.lo ext/hash/hash_gost.lo ext/hash/hash_snefru.lo ext/hash/hash_whirlpool.lo ext/hash/hash_adler32.lo ext/hash/hash_crc32.lo ext/iconv/iconv.lo ext/json/json.lo ext/json/utf8_to_utf16.lo ext/json/utf8_decode.lo ext/json/JSON_parser.lo ext/mysql/php_mysql.lo ext/pdo/pdo.lo ext/pdo/pdo_dbh.lo ext/pdo/pdo_stmt.lo ext/pdo/pdo_sql_parser.lo ext/pdo/pdo_sqlstate.lo ext/pdo_mysql/pdo_mysql.lo ext/pdo_mysql/mysql_driver.lo ext/pdo_mysql/mysql_statement.lo ext/pdo_pgsql/pdo_pgsql.lo ext/pdo_pgsql/pgsql_driver.lo ext/pdo_pgsql/pgsql_statement.lo ext/pdo_sqlite/pdo_sqlite.lo ext/pdo_sqlite/sqlite_driver.lo ext/pdo_sqlite/sqlite_statement.lo ext/pdo_sqlite/sqlite/src/attach.lo ext/pdo_sqlite/sqlite/src/auth.lo ext/pdo_sqlite/sqlite/src/btree.lo ext/pdo_sqlite/sqlite/src/build.lo ext/pdo_sqlite/sqlite/src/callback.lo ext/pdo_sqlite/sqlite/src/date.lo ext/pdo_sqlite/sqlite/src/delete.lo ext/pdo_sqlite/sqlite/src/expr.lo ext/pdo_sqlite/sqlite/src/func.lo ext/pdo_sqlite/sqlite/src/hash.lo ext/pdo_sqlite/sqlite/src/insert.lo ext/pdo_sqlite/sqlite/src/legacy.lo ext/pdo_sqlite/sqlite/src/main.lo ext/pdo_sqlite/sqlite/src/os_unix.lo ext/pdo_sqlite/sqlite/src/os_win.lo ext/pdo_sqlite/sqlite/src/os.lo ext/pdo_sqlite/sqlite/src/pager.lo ext/pdo_sqlite/sqlite/src/pragma.lo ext/pdo_sqlite/sqlite/src/prepare.lo ext/pdo_sqlite/sqlite/src/printf.lo ext/pdo_sqlite/sqlite/src/random.lo ext/pdo_sqlite/sqlite/src/select.lo ext/pdo_sqlite/sqlite/src/table.lo ext/pdo_sqlite/sqlite/src/tokenize.lo ext/pdo_sqlite/sqlite/src/analyze.lo ext/pdo_sqlite/sqlite/src/complete.lo ext/pdo_sqlite/sqlite/src/trigger.lo ext/pdo_sqlite/sqlite/src/update.lo ext/pdo_sqlite/sqlite/src/utf.lo ext/pdo_sqlite/sqlite/src/util.lo ext/pdo_sqlite/sqlite/src/vacuum.lo ext/pdo_sqlite/sqlite/src/vdbeapi.lo ext/pdo_sqlite/sqlite/src/vdbeaux.lo ext/pdo_sqlite/sqlite/src/vdbe.lo ext/pdo_sqlite/sqlite/src/vdbemem.lo ext/pdo_sqlite/sqlite/src/where.lo ext/pdo_sqlite/sqlite/src/parse.lo ext/pdo_sqlite/sqlite/src/opcodes.lo ext/pdo_sqlite/sqlite/src/alter.lo ext/pdo_sqlite/sqlite/src/vdbefifo.lo ext/pdo_sqlite/sqlite/src/vtab.lo ext/pdo_sqlite/sqlite/src/loadext.lo ext/pgsql/pgsql.lo ext/posix/posix.lo ext/reflection/php_reflection.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_sxe.lo ext/spl/spl_exceptions.lo ext/spl/spl_observer.lo ext/sqlite/sqlite.lo ext/sqlite/sess_sqlite.lo ext/sqlite/pdo_sqlite2.lo ext/sqlite/libsqlite/src/opcodes.lo ext/sqlite/libsqlite/src/parse.lo ext/sqlite/libsqlite/src/encode.lo ext/sqlite/libsqlite/src/auth.lo ext/sqlite/libsqlite/src/btree.lo ext/sqlite/libsqlite/src/build.lo ext/sqlite/libsqlite/src/delete.lo ext/sqlite/libsqlite/src/expr.lo ext/sqlite/libsqlite/src/func.lo ext/sqlite/libsqlite/src/hash.lo ext/sqlite/libsqlite/src/insert.lo ext/sqlite/libsqlite/src/main.lo ext/sqlite/libsqlite/src/os.lo ext/sqlite/libsqlite/src/pager.lo ext/sqlite/libsqlite/src/printf.lo ext/sqlite/libsqlite/src/random.lo ext/sqlite/libsqlite/src/select.lo ext/sqlite/libsqlite/src/table.lo ext/sqlite/libsqlite/src/tokenize.lo ext/sqlite/libsqlite/src/update.lo ext/sqlite/libsqlite/src/util.lo ext/sqlite/libsqlite/src/vdbe.lo ext/sqlite/libsqlite/src/attach.lo ext/sqlite/libsqlite/src/btree_rb.lo ext/sqlite/libsqlite/src/pragma.lo ext/sqlite/libsqlite/src/vacuum.lo ext/sqlite/libsqlite/src/copy.lo ext/sqlite/libsqlite/src/vdbeaux.lo ext/sqlite/libsqlite/src/date.lo ext/sqlite/libsqlite/src/where.lo ext/sqlite/libsqlite/src/trigger.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/sha1.lo ext/standard/user_filters.lo ext/standard/uuencode.lo ext/standard/filters.lo ext/standard/proc_open.lo ext/standard/streamsfuncs.lo ext/standard/http.lo ext/tokenizer/tokenizer.lo ext/tokenizer/tokenizer_data.lo ext/xml/xml.lo ext/xml/compat.lo ext/xmlreader/php_xmlreader.lo ext/xmlwriter/php_xmlwriter.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/php_cli_readline.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lcrypt -lpq -lrt -lpq -lmysqlclient -liconv -lz -lssl -lcrypto -lrt -lm -liconv -lxml2 -lz -llzma -lm -lxml2 -lz -llzma -lm -lmysqlclient -lz -lm -lssl -lcrypto -lxml2 -lz -llzma -lm -lcrypt -lxml2 -lz -llzma -lm -lxml2 -lz -llzma -lm -lxml2 -lz -llzma -lm -lcrypt -o sapi/cli/php /usr/bin/ld: warning: libssl.so.3, needed by /usr/lib64/libpq.so, may conflict with libssl.so.1.0.0 /usr/bin/ld: warning: libssl.so.3, needed by /usr/lib64/libpq.so, may conflict with libssl.so.1.0.0 /usr/bin/ld: warning: libcrypto.so.3, needed by /usr/lib64/libpq.so, may conflict with libcrypto.so.1.0.0 /usr/bin/ld: warning: libcrypto.so.3, needed by /usr/lib64/libpq.so, may conflict with libcrypto.so.1.0.0 Build complete. Don't forget to run 'make test'. # |
テストする。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# make test Build complete. Don't forget to run 'make test'. ===================================================================== PHP : /usr/local/src/php/php-5.2.17_/sapi/cli/php PHP_SAPI : cli PHP_VERSION : 5.2.17 ZEND_VERSION: 2.2.0 PHP_OS : Linux - Linux raspberrypi.ksm.mydns.jp 6.1.31-v8.1.el9.altarch #1 SMP PREEMPT Sat Jun 10 22:16:20 UTC 2023 aarch64 INI actual : /usr/local/src/php/php-5.2.17/tmp-php.ini More .INIs : CWD : /usr/local/src/php/php-5.2.17 Extra dirs : VALGRIND : Not used ===================================================================== TIME START 2026-03-21 01:11:33 ===================================================================== TEST 1/6749 [tests/run-test/test001.phpt]PASS EXPECT [tests/run-test/test001.phpt] TEST 2/6749 [tests/run-test/test002.phpt]PASS EXPECTF [tests/run-test/test002.phpt] TEST 3/6749 [tests/run-test/test003.phpt]PASS EXPECTREGEX [tests/run-test/test003.phpt] TEST 4/6749 [tests/run-test/test004.phpt]PASS INI section allows '=' [tests/run-test/test004.phpt] TEST 5/6749 [tests/run-test/test005.phpt]PASS Error message handling (without ZendOptimizer) [tests/run-test/test005.phpt] TEST 6/6749 [tests/run-test/test006.phpt]PASS Error messages are shown [tests/run-test/test006.phpt] TEST 7/6749 [tests/run-test/test007.phpt]PASS dirname test [tests/run-test/test007.phpt] TEST 8/6749 [tests/run-test/test008.phpt]SKIP Error message handling (with ZendOptimizer) [tests/run-test/test008.phpt] reason: Zend Optimizer is not loaded TEST 9/6749 [tests/run-test/test008a.phpt]PASS Error message handling (without ZendOptimizer) [tests/run-test/test008a.phpt] TEST 10/6749 [tests/run-test/test009.phpt]PASS print_r(Object) [tests/run-test/test009.phpt] : TEST 6960/6973 [sapi/cli/tests/006.phpt]PASS show information about extension [sapi/cli/tests/006.phpt] TEST 6961/6973 [sapi/cli/tests/007.phpt]PASS strip comments and whitespace with -w [sapi/cli/tests/007.phpt] TEST 6962/6973 [sapi/cli/tests/008.phpt]PASS execute a file with -f [sapi/cli/tests/008.phpt] TEST 6963/6973 [sapi/cli/tests/009.phpt]PASS using invalid combinations of cmdline options [sapi/cli/tests/009.phpt] TEST 6964/6973 [sapi/cli/tests/010-2.phpt]PASS executing a code with -R [sapi/cli/tests/010-2.phpt] TEST 6965/6973 [sapi/cli/tests/010.phpt]PASS executing a file with -F [sapi/cli/tests/010.phpt] TEST 6966/6973 [sapi/cli/tests/011.phpt]PASS syntax check [sapi/cli/tests/011.phpt] TEST 6967/6973 [sapi/cli/tests/012.phpt]PASS invalid arguments and error messages [sapi/cli/tests/012.phpt] TEST 6968/6973 [sapi/cli/tests/013.phpt]PASS running PHP code before and after processing input lines with -B and -E [sapi/cli/tests/013.phpt] TEST 6969/6973 [sapi/cli/tests/014.phpt]PASS syntax highlighting [sapi/cli/tests/014.phpt] TEST 6970/6973 [sapi/cli/tests/015.phpt]PASS CLI long options [sapi/cli/tests/015.phpt] TEST 6971/6973 [sapi/cli/tests/021.phpt]PASS CLI shell shebang [sapi/cli/tests/021.phpt] TEST 6972/6973 [sapi/cli/tests/022.phpt]PASS STDIN/OUT/ERR stream type [sapi/cli/tests/022.phpt] TEST 6973/6973 [sapi/cli/tests/bug44564.phpt]PASS Bug #44564 (escapeshellarg removes UTF-8 multi-byte characters) [sapi/cli/tests/bug44564.phpt] ===================================================================== TIME END 2026-03-21 01:23:51 ===================================================================== TEST RESULT SUMMARY --------------------------------------------------------------------- Exts skipped : 51 Exts tested : 28 --------------------------------------------------------------------- Number of tests : 9087 6433 Tests skipped : 2654 ( 29.2%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 39 ( 0.4%) ( 0.6%) Expected fail : 5 ( 0.1%) ( 0.1%) Tests passed : 6389 ( 70.3%) ( 99.3%) --------------------------------------------------------------------- Time taken : 738 seconds ===================================================================== ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Test & operator : 64bit long tests [tests/lang/operators/bitwiseAnd_basiclong_64bit.phpt] Test ~N operator : 64bit long tests [tests/lang/operators/bitwiseNot_basiclong_64bit.phpt] Test | operator : 64bit long tests [tests/lang/operators/bitwiseOr_basiclong_64bit.phpt] Test << operator : 64bit long tests [tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt] Test >> operator : 64bit long tests [tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt] Test ^ operator : 64bit long tests [tests/lang/operators/bitwiseXor_basiclong_64bit.phpt] Test % operator : 64bit long tests [tests/lang/operators/modulus_basiclong_64bit.phpt] testing integer overflow (64bit) [Zend/tests/int_overflow_64bit.phpt] timezone_abbreviations_list() tests [ext/date/tests/010.phpt] Test DateTimeZone::listAbbreviations() function : basic functionality [ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt] Test DateTime::modify() function : usage variation - Passing unexpected values to first argument $modify. [ext/date/tests/DateTime_modify_variation1.phpt] Test date_modify() function : usage variation - Passing unexpected values to second argument $format. [ext/date/tests/date_modify_variation2.phpt] Test timezone_abbreviations_list() function : basic functionality [ext/date/tests/timezone_abbreviations_list_basic1.phpt] DOMDocument::validate() should validate an external DTD declaration [ext/dom/tests/DOMDocument_validate_external_dtd.phpt] DOMDocument::$validateOnParse - effectual determination (dom_document_validate_on_parse_read/dom_document_validate_on_parse_write) [ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt] Bug #43364 (recursive xincludes don't remove internal xml nodes properly) [ext/dom/tests/bug43364.phpt] Test 5: HTML Test [ext/dom/tests/dom005.phpt] Test 7: DTD tests [ext/dom/tests/dom007.phpt] iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] Bug #28382 (openssl_x509_parse extensions support) [ext/openssl/tests/bug28382.phpt] Bug #47828 (segfaults when a UTF-8 conversion fails openssl_x509_parse()) [ext/openssl/tests/bug47828.phpt] Test session_encode() function : error functionality [ext/session/tests/session_encode_error2.phpt] SimpleXML: XPath [ext/simplexml/tests/008.phpt] Test uniqid() function : basic functionality [ext/standard/tests/general_functions/uniqid_basic.phpt] Test decbin function : 64bit long tests [ext/standard/tests/math/decbin_basiclong_64bit.phpt] Test decbin() function : usage variations - different data types as $number arg [ext/standard/tests/math/decbin_variation1_64bit.phpt] Test dechex function : 64bit long tests [ext/standard/tests/math/dechex_basiclong_64bit.phpt] Test dechex() function : usage variations - different data types as $number arg [ext/standard/tests/math/dechex_variation1_64bit.phpt] Test decoct function : 64bit long tests [ext/standard/tests/math/decoct_basiclong_64bit.phpt] Test decoct() function : usage variations - different data types as $number arg [ext/standard/tests/math/decoct_variation1_64bit.phpt] time_sleep_until() function - basic test for time_sleep_until() [ext/standard/tests/misc/time_sleep_until_basic.phpt] Test split() function : usage variations - out-of-range values for limit [ext/standard/tests/reg/split_variation_004.phpt] Test spliti() function : usage variations - out-of-range values for limit [ext/standard/tests/reg/spliti_variation_004.phpt] Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796) [ext/standard/tests/strings/chunk_split_variation2.phpt] crypt() function [ext/standard/tests/strings/crypt.phpt] Test vprintf() function : usage variations - unsigned formats with unsigned values [ext/standard/tests/strings/vprintf_variation15_64bit.phpt] Test vsprintf() function : usage variations - unsigned formats with unsigned values [ext/standard/tests/strings/vsprintf_variation15_64bit.phpt] Test strptime() function : basic functionality [ext/standard/tests/time/strptime_basic.phpt] Test function gzgetc() by calling it with its expected arguments [ext/zlib/tests/gzgetc_basic.phpt] ===================================================================== ===================================================================== EXPECTED FAILED TEST SUMMARY --------------------------------------------------------------------- output buffering - fatalism [tests/output/ob_011.phpt] ob_start(): Ensure unerasable buffer cannot be flushed by ob_flush() [tests/output/ob_start_basic_unerasable_005.phpt] Bug #42718 (unsafe_raw filter not applied when configured as default filter) [ext/filter/tests/bug42718.phpt] SPL: ArrayObject::exchangeArray() basic usage with object as underlying data store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt] Bug #39863 (file_exists() silently truncates after a null byte) [ext/standard/tests/file/bug39863.phpt] ===================================================================== You may have found a problem in PHP. We would like to send this report automatically to the PHP QA team, to give us a better understanding of how the test cases are doing. If you don't want to send it immediately, you can choose "s" to save the report to a file that you can send us later. Do you want to send this report now? [Yns]: n # |
インストールする。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# make install Installing PHP SAPI module: cgi Installing PHP CGI binary: /usr/local/php-5.2.17/bin/ Installing FPM config: /usr/local/php-5.2.17/etc/php-fpm.conf (installing as php-fpm.conf.default) Installing init.d script: /usr/local/php-5.2.17/sbin/php-fpm Installing PHP CLI binary: /usr/local/php-5.2.17/bin/ Installing PHP CLI man page: /usr/local/php-5.2.17/man/man1/ Installing build environment: /usr/local/php-5.2.17/lib/php/build/ Installing header files: /usr/local/php-5.2.17/include/php/ Installing helper programs: /usr/local/php-5.2.17/bin/ program: phpize program: php-config Installing man pages: /usr/local/php-5.2.17/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/php-5.2.17/lib/php/ [PEAR] Archive_Tar - already installed: 1.3.7 [PEAR] Console_Getopt - already installed: 1.2.3 [PEAR] Structures_Graph- already installed: 1.0.3 [PEAR] XML_Util - already installed: 1.2.1 [PEAR] PEAR - already installed: 1.9.1 Wrote PEAR system config file at: /usr/local/php-5.2.17/etc/pear.conf You may want to add: /usr/local/php-5.2.17/lib/php to your php.ini include_path Installing PDO headers: /usr/local/php-5.2.17/include/php/ext/pdo/ # |
環境を作成する。
以下のファイルを設定する。
・php-fpm.conf
・php.ini
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# mkdir /usr/local/php-5.2.17/var # # mkdir /usr/local/php-5.2.17/var/run # # mkdir /usr/local/php-5.2.17/var/run/php-fpm # # cp php.ini* /usr/local/php-5.2.17/etc/ # # chown -R nginx:nginx /usr/local/php-5.2.17 # # cd /usr/local/php-5.2.17/etc # # cp php-fpm.conf php-fpm.conf_org # ls -l 合計 20 -rw-r----- 1 nginx nginx 1222 3月 21 10:27 pear.conf -rw-r--r-- 1 nginx nginx 5261 3月 21 14:37 php-fpm.conf -rw-r--r-- 1 nginx nginx 5208 3月 21 10:26 php-fpm.conf_org -rw-r----- 1 root root 45195 3月 21 15:50 php.ini-dist -rw-r----- 1 root root 48818 3月 21 15:50 php.ini-recommended # # vi php-fpm.conf # # diff -c php-fpm.conf_org php-fpm.conf *** php-fpm.conf_org 2026-03-21 10:26:23.219132367 +0900 --- php-fpm.conf 2026-03-21 14:37:52.105899875 +0900 *************** *** 38,44 **** Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' ! <value name="listen_address">127.0.0.1:9000</value> <value name="listen_options"> --- 38,44 ---- Address to accept fastcgi requests on. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket' ! <value name="listen_address">/usr/local/php-5.2.17/var/run/php-fpm/php-fpm-5.2.17.sock</value> <value name="listen_options"> *************** *** 48,55 **** Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. ! <value name="owner"></value> ! <value name="group"></value> <value name="mode">0666</value> </value> --- 48,55 ---- Set permissions for unix socket, if one used. In Linux read/write permissions must be set in order to allow connections from web server. Many BSD-derrived systems allow connections regardless of permissions. ! <value name="owner">nginx</value> ! <value name="group">nginx</value> <value name="mode">0666</value> </value> *************** *** 60,69 **** </value> Unix user of processes ! <!-- <value name="user">nobody</value> --> Unix group of processes ! <!-- <value name="group">nobody</value> --> Process manager settings <value name="pm"> --- 60,69 ---- </value> Unix user of processes ! <value name="user">nginx</value> Unix group of processes ! <value name="group">nginx</value> Process manager settings <value name="pm"> *************** *** 107,113 **** <value name="request_slowlog_timeout">0s</value> The log file for slow requests ! <value name="slowlog">logs/slow.log</value> Set open file desc rlimit <value name="rlimit_files">1024</value> --- 107,113 ---- <value name="request_slowlog_timeout">0s</value> The log file for slow requests ! <value name="slowlog">/usr/local/php-5.2.17/logs/slow.log</value> Set open file desc rlimit <value name="rlimit_files">1024</value> # # cp php.ini-recommended php.ini # # vi php.ini # # diff -c php.ini-recommended php.ini *** php.ini-recommended 2026-03-21 15:50:45.615617924 +0900 --- php.ini 2026-03-21 16:20:40.613492515 +0900 *************** *** 129,135 **** ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. ! short_open_tag = Off ; Allow ASP-style <% %> tags. asp_tags = Off --- 129,135 ---- ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. ! short_open_tag = On ; Allow ASP-style <% %> tags. asp_tags = Off *************** *** 294,300 **** ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ! expose_php = On ;;;;;;;;;;;;;;;;;;; --- 294,300 ---- ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ! expose_php = Off ;;;;;;;;;;;;;;;;;;; *************** *** 351,357 **** ; ; - Show all errors, except coding standards warnings ; ! error_reporting = E_ALL ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging --- 351,357 ---- ; ; - Show all errors, except coding standards warnings ; ! error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging *************** *** 412,418 **** ; Disable the inclusion of HTML tags in error messages. ; Note: Never use this feature for production boxes. ! ;html_errors = Off ; If html_errors is set On PHP produces clickable error messages that direct ; to a page describing the error or function causing the error in detail. --- 412,418 ---- ; Disable the inclusion of HTML tags in error messages. ; Note: Never use this feature for production boxes. ! html_errors = On ; If html_errors is set On PHP produces clickable error messages that direct ; to a page describing the error or function causing the error in detail. *************** *** 431,437 **** ;error_append_string = "</font>" ; Log errors to specified file. ! ;error_log = filename ; Log errors to syslog (Event Log on NT, not valid in Windows 95). ;error_log = syslog --- 431,437 ---- ;error_append_string = "</font>" ; Log errors to specified file. ! error_log = /usr/local/php-5.2.17/logs/php-error.log ; Log errors to syslog (Event Log on NT, not valid in Windows 95). ;error_log = syslog *************** *** 457,462 **** --- 457,463 ---- ; referred to as EGPCS or GPC). Registration is done from left to right, newer ; values override older values. variables_order = "GPCS" + request_order = "GP" ; Whether or not to register the EGPCS variables as global variables. You may ; want to turn this off if you don't want to clutter your scripts' global scope *************** *** 465,471 **** ; variables. ; ; You should do your best to write your scripts so that they do not require ! ; register_globals to be on; Using form variables as globals can easily lead ; to possible security problems, if the code is not very well thought of. register_globals = Off --- 466,472 ---- ; variables. ; ; You should do your best to write your scripts so that they do not require ! ; eegister_globals to be on; Using form variables as globals can easily lead ; to possible security problems, if the code is not very well thought of. register_globals = Off *************** *** 487,493 **** auto_globals_jit = On ; Maximum size of POST data that PHP will accept. ! post_max_size = 8M ; Magic quotes ; --- 488,494 ---- auto_globals_jit = On ; Maximum size of POST data that PHP will accept. ! post_max_size = 32M ; Magic quotes ; *************** *** 539,545 **** user_dir = ; Directory in which the loadable extensions (modules) reside. ! extension_dir = "./" ; Whether or not to enable the dl() function. The dl() function does NOT work ; properly in multithreaded servers, such as IIS or Zeus, and is automatically --- 540,546 ---- user_dir = ; Directory in which the loadable extensions (modules) reside. ! extension_dir = "/usr/local/php-5.2.17/lib/php/extensions/no-debug-non-zts-20060613" ; Whether or not to enable the dl() function. The dl() function does NOT work ; properly in multithreaded servers, such as IIS or Zeus, and is automatically *************** *** 568,574 **** ; this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ! ; cgi.fix_pathinfo=1 ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate ; security tokens of the calling client. This allows IIS to define the --- 569,575 ---- ; this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ! cgi.fix_pathinfo=1 ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate ; security tokens of the calling client. This allows IIS to define the *************** *** 587,592 **** --- 588,597 ---- ; Default is zero. ;cgi.rfc2616_headers = 0 + ;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Disable dangerous functions + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source ;;;;;;;;;;;;;;;; ; File Uploads ; *************** *** 597,606 **** ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ! ;upload_tmp_dir = ; Maximum allowed size for uploaded files. ! upload_max_filesize = 2M ; Maximum number of files that can be uploaded via a single request --- 602,611 ---- ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ! ;upload_tmp_dir = /tmp ; Maximum allowed size for uploaded files. ! upload_max_filesize = 32M ; Maximum number of files that can be uploaded via a single request *************** *** 707,719 **** ;extension=php_xsl.dll ;extension=php_zip.dll ;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;; [Date] ; Defines the default timezone used by the date functions ! ;date.timezone = ;date.default_latitude = 31.7667 ;date.default_longitude = 35.2333 --- 712,743 ---- ;extension=php_xsl.dll ;extension=php_zip.dll + extension = mysql.so + extension = mysqli.so + extension = mbstring.so + ;extension = gd.so + ;extension = curl.so + ;extension = openssl.so + ;extension = zip.so + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; mysql + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + mysql.default_charset = UTF-8 + mysql.default_socket = /usr/local/mysql-5.6.51/data/mysql.sock + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; mysqli + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + mysqli.default_socket = /usr/local/mysql-5.6.51/data/mysql.sock + ; ;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;; [Date] ; Defines the default timezone used by the date functions ! date.timezone = Asia/Tokyo ;date.default_latitude = 31.7667 ;date.default_longitude = 35.2333 *************** *** 1043,1049 **** ; ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ! ;session.save_path = "/tmp" ; Whether to use cookies. session.use_cookies = 1 --- 1067,1073 ---- ; ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ! session.save_path = "/tmp" ; Whether to use cookies. session.use_cookies = 1 *************** *** 1052,1058 **** ; This option enables administrators to make their users invulnerable to ; attacks which involve passing session ids in URLs; defaults to 0. ! ; session.use_only_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID --- 1076,1082 ---- ; This option enables administrators to make their users invulnerable to ; attacks which involve passing session ids in URLs; defaults to 0. ! session.use_only_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID *************** *** 1087,1092 **** --- 1111,1119 ---- ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 + session.gc_divisor = 1000 + session.gc_probability = 1 + ; NOTE: If you are using the subdirectory option for storing session files ; (see session.save_path above), then garbage collection does *not* *************** *** 1241,1259 **** [mbstring] ; language for internal character representation. ! ;mbstring.language = Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) ! ;mbstring.internal_encoding = EUC-JP ; http input encoding. ! ;mbstring.http_input = auto ; http output encoding. mb_output_handler must be ; registered as output buffer to function ! ;mbstring.http_output = SJIS ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are --- 1268,1286 ---- [mbstring] ; language for internal character representation. ! mbstring.language = Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) ! mbstring.internal_encoding = UTF-8 ; http input encoding. ! mbstring.http_input = auto ; http output encoding. mb_output_handler must be ; registered as output buffer to function ! mbstring.http_output = UTF-8 ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are *************** *** 1264,1270 **** ; automatic encoding detection order. ; auto means ! ;mbstring.detect_order = auto ; substitute_character used when character cannot be converted ; one from another --- 1291,1297 ---- ; automatic encoding detection order. ; auto means ! mbstring.detect_order = UTF-8,SJIS,EUC-JP,JIS,ASCII ; substitute_character used when character cannot be converted ; one from another # |
php-fpmを起動するシェルを作成し、起動する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# vi /etc/rc.d/php-fpm-5.2.17 # # cat /etc/rc.d/php-fpm-5.2.17 #!/bin/bash export LD_LIBRARY_PATH=/usr/local/php-5.2.17/lib:/usr/local/ssl-1.0.2/lib:/usr/local/lib:/usr/lib64:/usrlib export PATH=/usr/local/php-5.2.17/bin:/usr/local/ssl-1.0.2/bin:${PATH} /usr/local/php-5.2.17/sbin/php-fpm $1 # # chmod 755 /etc/rc.d/php-fpm-5.2.17 # /etc/rc.d/php-fpm-5.2.17 start Starting php_fpm . done # # ps -fea | grep fpm root 337 1 0 3月13 ? 00:01:34 php-fpm: master process (/etc/php-fpm.conf) root 136754 1 0 14:37 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf nginx 136756 136754 0 14:37 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf nginx 136757 136754 0 14:37 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf nginx 136758 136754 0 14:37 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf nginx 136760 136754 0 14:37 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf nginx 136761 136754 0 14:37 ? 00:00:00 /usr/local/php-5.2.17/bin/php-cgi --fpm --fpm-config /usr/local/php-5.2.17/etc/php-fpm.conf root 137261 4023961 0 14:44 pts/2 00:00:00 grep --color=auto fpm nginx 746646 337 0 3月15 ? 00:05:28 php-fpm: pool www nginx 746647 337 0 3月15 ? 00:04:15 php-fpm: pool www nginx 746648 337 0 3月15 ? 00:04:10 php-fpm: pool www nginx 746649 337 0 3月15 ? 00:04:11 php-fpm: pool www nginx 746651 337 0 3月15 ? 00:04:28 php-fpm: pool www nginx 746652 337 0 3月15 ? 00:04:17 php-fpm: pool www nginx 746653 337 0 3月15 ? 00:04:26 php-fpm: pool www nginx 1037855 337 0 3月15 ? 00:03:52 php-fpm: pool www nginx 1037876 337 0 3月15 ? 00:03:52 php-fpm: pool www nginx 1037877 337 0 3月15 ? 00:04:14 php-fpm: pool www nginx 1087804 337 0 3月15 ? 00:03:40 php-fpm: pool www # |
抹茶ユーザを作成する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# adduser matcha # # su - matcha $ $ cp .bashrc .bashrc_org $ $ vi .bashrc $ $ diff -c .bashrc_org .bashrc *** .bashrc_org 2025-06-14 16:40:18.000000000 +0900 --- .bashrc 2025-06-14 16:44:21.000000000 +0900 *************** *** 25,27 **** --- 25,30 ---- fi unset rc + + PATH="/usr/local/php-5.2.17/bin:$PATH" + export PATH $ $ source .bashrc $ $ php -v PHP 5.2.17 (cli) (built: Mar 25 2026 17:31:23) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies $ $ exit # |
抹茶アーカイブを展開する。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# cd /home/matcha # # unzip matcha-sns-1.3.9.zip Archive: matcha-sns-1.3.9.zip inflating: matcha-sns-1.3.9/.gitignore inflating: matcha-sns-1.3.9/.htaccess inflating: matcha-sns-1.3.9/.travis.yml inflating: matcha-sns-1.3.9/app/.htaccess inflating: matcha-sns-1.3.9/app/app_controller.php : inflating: matcha-sns-1.3.9/cake/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css inflating: matcha-sns-1.3.9/cake/tests/test_app/webroot/theme/test_theme/css/webroot_test.css extracting: matcha-sns-1.3.9/cake/tests/test_app/webroot/theme/test_theme/img/cake.power.gif inflating: matcha-sns-1.3.9/cake/tests/test_app/webroot/theme/test_theme/img/test.jpg inflating: matcha-sns-1.3.9/cake/VERSION.txt inflating: matcha-sns-1.3.9/index.php inflating: matcha-sns-1.3.9/LICENSE inflating: matcha-sns-1.3.9/NOTICE extracting: matcha-sns-1.3.9/plugins/empty inflating: matcha-sns-1.3.9/README extracting: matcha-sns-1.3.9/vendors/shells/tasks/empty extracting: matcha-sns-1.3.9/vendors/shells/templates/empty # # chown -R matcha:matcha matcha-sns-1.3.9 # # ln -s matcha-sns-1.3.9 matcha # # ls -l 合計 5176 drwx------ 5 matcha matcha 4096 1月 4 2024 Maildir drwxr-x--- 6 root root 4096 3月 22 17:01 matcha-sns-1.3.9 -rwxr--r-- 1 matcha matcha 2862992 4月 12 2025 matcha-sns-1.3.9.zip # # chown -R matcha:matcha matcha-sns-1.3.9 # # ln -s matcha-sns-1.3.9 matcha # # ls -l 合計 5176 drwx------ 5 matcha matcha 4096 1月 4 2024 Maildir lrwxrwxrwx 1 root root 16 3月 22 17:04 matcha -> matcha-sns-1.3.9 drwxr-x--- 6 matcha matcha 4096 3月 22 17:01 matcha-sns-1.3.9 -rwxr--r-- 1 matcha matcha 2862992 4月 12 2025 matcha-sns-1.3.9.zip # # setfacl -R -m u:nginx:rwx matcha-sns-1.3.9 # # getfacl matcha-sns-1.3.9 # file: matcha-sns-1.3.9 # owner: matcha # group: matcha user::rwx user:nginx:rwx group::r-x mask::rwx other::--- # |
環境を設定する。
以下のファイルを修正する。
・core.php
・database.php
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# cp core.php core.php_org # # vi core.php # # diff -c core.php_org core.php *** core.php_org 2026-03-22 17:16:39.089049561 +0900 --- core.php 2026-03-22 17:18:41.880652853 +0900 *************** *** 33,41 **** * In production mode, flash messages redirect after a time interval. * In development mode, you need to click the flash message to continue. */ ! ! Configure::write('debug', 0); ! /** * CakePHP Log Level: --- 33,39 ---- * In production mode, flash messages redirect after a time interval. * In development mode, you need to click the flash message to continue. */ ! Configure::write('debug', 2); /** * CakePHP Log Level: *************** *** 166,178 **** * characters." * @link http://php.net/session_name */ ! Configure::write('Session.cookie', 'MATCHA-SNS'); /** * Session time out time (in seconds). * Actual value depends on 'Security.level' setting. */ ! Configure::write('Session.timeout', (60 * 60 * 24 * 7) / 100); /** * If set to false, sessions are not automatically started. --- 164,176 ---- * characters." * @link http://php.net/session_name */ ! Configure::write('Session.cookie', 'CAKEPHP'); /** * Session time out time (in seconds). * Actual value depends on 'Security.level' setting. */ ! Configure::write('Session.timeout', '120'); /** * If set to false, sessions are not automatically started. *************** *** 203,213 **** /** * A random string used in security hashing methods. */ ! Configure::write('Security.salt', 'DYhG93b0qyIfIxfs2guVoUubWwvniR2G0FgaC9mi'); /** * A random numeric string (digits only) used to encrypt/decrypt strings. */ ! Configure::write('Security.cipherSeed', '76859309657198048034862324894'); /** * Apply timestamps with the last modified time to static assets (js, css, images). * Will append a querystring parameter containing the time the file was modified. This is --- 201,213 ---- /** * A random string used in security hashing methods. */ ! Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9miABCDEF'); /** * A random numeric string (digits only) used to encrypt/decrypt strings. */ ! Configure::write('Security.cipherSeed', '76859309657453542496749683645i123456'); /** * Apply timestamps with the last modified time to static assets (js, css, images). * Will append a querystring parameter containing the time the file was modified. This is # # cp database.php database.php_org # # vi database.php # # diff -c database.php_org database.php *** database.php_org 2026-03-22 17:14:50.697399747 +0900 --- database.php 2026-03-24 09:41:56.388788303 +0900 *************** *** 75,86 **** var $default = array( 'driver' => 'mysql', ! 'persistent' => '', ! 'host' => '', ! 'login' => '', ! 'password' => '', ! 'database' => '', 'prefix' => '', ); function __construct() { --- 75,88 ---- var $default = array( 'driver' => 'mysql', ! 'persistent' => false, ! 'host' => 'localhost', ! 'login' => 'matcha', ! 'password' => 'mypassword', ! 'database' => 'matcha', 'prefix' => '', + 'socket' => '/usr/local/mysql-5.6.51/data/mysql.sock', + 'encoding' => 'utf8', ); function __construct() { # # chown matcha:matcha * # # setfacl -m u:nginx:nginx * # |
nginxを設定する。
以下のURLに情報が有りました。
CakePHP インストール
https://legacybook.cakephp.org/1.3/ja/The-Manual/Developing-with-CakePHP/Installation.html
サブドメインでのアクセスを設定する。
https://hogehoge.jp/matcha/
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
location /matcha/ { alias /home/matcha/matcha/app/webroot/; index index.php; #try_files $uri $uri/ /matcha/index.php?$query_string; if (-f $request_filename) { break; } if (-d $request_filename) { break; } rewrite ^(.+)$ /matcha/index.php?q=$1 last; location ~* \.(?:css|js|png|jpg|jpeg|gif|svg|ico|woff2?|ttf)$ { expires 7d; access_log off; add_header Cache-Control "public, max-age=604800, immutable"; } location ~\.php$ { try_files $uri =404; fastcgi_pass unix:/usr/local/php-5.2.17/var/run/php-fpm/php-fpm-5.2.17.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; #CakePHPがPATH_INFOを必要とする場合の保険 fastcgi_param PATH_INFO $fastcgi_path_info; # エラーを直接確認するため(デフォルトoff) fastcgi_intercept_errors off; } } location ~ /\.(git|hg|svn) { deny all; } [root@raspberrypi ksm.mydns.jp]# # # nginx-t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # # systemctl restart nginx # |
WEBでアクセスする
利用環境をチェックする。
問題が無ければ、下の「DB接続する」をクリックする。

データベースアクセスの設定を行う。
mysqlの登録したmatchaデータベースへのアクセス情報を登録する。

データベースにテーブルを作成を実行する。

管理者を登録する。
初回ログインする管理者ユーザを塘路する。
名前には漢字も利用可能である。

管理者でログインする。
上で指定した情報を入力して、ログインする。

メイン画面が表示される。

まとめ
「ユーザ」タブはユーザを検索するのみで、ユーザを登録することはできない。
個人的意見ではあるが、利用用法が直感的に判断できないと思われる。
