公開鍵認証
公開鍵認証でSSH接続していて、新サーバでも鍵を使い回した場合に認証エラーが出る事があります。これはRocky9ではssh-rsaなどの古いタイプの鍵形式が廃止になった為です。
古い形式を使える様にする方法もありますが、大人しく以下のコマンドで新しい鍵を作った方が賢明です。私は何も考えずにPoderosaの鍵生成機能を使っていたのでこれでハマりました。
ssh-keygen -t ecdsa -b 521 -C "your_email@example.com" #ecdsa ssh-keygen -t ed25519 -C "your_email@example.com" #ed25519 cat ~/.ssh/id_ed25519.pub | ssh user@your-server "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" #鍵を転送
MySQL(MariaDB)
以下のようなエラー
2025-02-19T06:45:18.029220Z 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 10000 (request: 65535)
Rocky Linux 9 では、systemd の制限が厳しくなっており、mysqld の LimitNOFILE を変更しないと 65535 以上にはできない。以下は変更例
mkdir -p /etc/systemd/system/mysqld.service.d echo -e "[Service]\nLimitNOFILE=65535" | tee /etc/systemd/system/mysqld.service.d/override.conf systemctl daemon-reexec systemctl restart mysqld
以下のようなエラーについて。
2025-02-19T06:52:10.920260Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_size=0'.
MySQL 8.0 では query_cache が完全に削除されているため、この設定が無効。
解決策: query_cache_sizeを含む行を 設定ファイルから削除 する。
私の古いサーバではMySQLの設定がデフォルトだったせいで、utf8のデータベースにlatin1でデータを入れているという酷い状態でした。
これを、デフォルトでutf8mb4で接続するRocky9に移行する場合は、latin1でダンプして、ファイルを開き、set names latin1の所をutf8と書き換えて、utf8でインポートする事で文字化けを回避できます。
mysqldump -uroot -p [db名] --default-character-set=latin1 --single-transaction --quick --lock-tables=false | gzip > mysql_backup_$(date +\%F).sql.gz zcat mysql_backup_.sql | mysql -u root -p --default-character-set=utf8 [db名]
grant all privileges on *.* to root@localhost identified by ***;
これはエラーが出ます。
MySQL 8.0 以降では GRANT 文でパスワードを変更できません。
IDENTIFIED BY は CREATE USER または ALTER USER で使うべきものになりました。
ALTER USER 'root'@'localhost' IDENTIFIED BY '新しいパスワード'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';
また、ユーザの指定を「root@%」にするとエラーが出ます。
デフォルトでは、MySQL の root ユーザーは localhost のみアクセス可能 です。
そのため、リモートアクセス (‘root’@’%’) はデフォルトでは無効になっています。
CREATE USER 'root'@'%' IDENTIFIED BY '新しいパスワード'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;
リモートアクセスを有効にするには、以下のように設定を加えます。
#bind-address = 127.0.0.1 bind-address = 0.0.0.0
以下のエラーについて
ERROR 1067 (42000) at line 1499: Invalid default value for 'pub_date'
MySQL 5.7 以降 (sql_mode に STRICT_TRANS_TABLES または NO_ZERO_DATE が含まれる場合)、DATETIME カラムに 0000-00-00 00:00:00 をデフォルト値として設定できなくなりました。MySQL 5.6 までは許可されていましたが、 5.7 以降では STRICT モードが有効 になりエラーになります。
以下は一時的にモードを無効にする方法
[mysqld] sql_mode=NO_ENGINE_SUBSTITUTION
もしくは、SQLのデフォルト値をCURRENT_TIMESTAMPやNULLに編集する。
以下のようなエラーについて。
ERROR 2013 (HY000) at line 827: Lost connection to MySQL server during query
mysqldumpで全DBをダンプしてしまっていませんか?mysqlDBが含まれていたりするとこのエラーが出るようです。そうでない場合は以下のような設定を試してみます。
[mysqld] max_allowed_packet = 256M net_read_timeout = 600 net_write_timeout = 600 innodb_log_file_size = 増やす
PHP
以下のエラー
running: make /bin/sh /var/tmp/pear-build-rootDpYRos/APC-3.1.9/libtool --mode=compile cc -I. -I/var/tmp/APC -I/var/tmp/pear-build-rootDpYRos/APC-3.1.9/include -I/var/tmp/pear-build-rootDpYRos/APC-3.1.9/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc.c -o apc.lo libtool: compile: cc -I. -I/var/tmp/APC -I/var/tmp/pear-build-rootDpYRos/APC-3.1.9/include -I/var/tmp/pear-build-rootDpYRos/APC-3.1.9/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc.c -fPIC -DPIC -o .libs/apc.o In file included from /var/tmp/APC/apc.c:34: /var/tmp/APC/apc.h:69:35: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 69 | extern void* apc_emalloc(size_t n TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:70:45: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 70 | extern void* apc_erealloc(void* p, size_t n TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:71:31: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 71 | extern void apc_efree(void* p TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:72:40: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 72 | extern char* apc_estrdup(const char* s TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:73:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 73 | extern void* apc_xstrdup(const char* s, apc_malloc_t f TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:74:66: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 74 | extern void* apc_xmemcpy(const void* p, size_t n, apc_malloc_t f TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:77:42: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 77 | extern void apc_error(const char *format TSRMLS_DC, ...); | ^~~~~~~~~ /var/tmp/APC/apc.h:78:44: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 78 | extern void apc_warning(const char *format TSRMLS_DC, ...); | ^~~~~~~~~ /var/tmp/APC/apc.h:79:43: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 79 | extern void apc_notice(const char *format TSRMLS_DC, ...); | ^~~~~~~~~ /var/tmp/APC/apc.h:80:42: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 80 | extern void apc_debug(const char *format TSRMLS_DC, ...); | ^~~~~~~~~ /var/tmp/APC/apc.h:83:54: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 83 | extern char* apc_append(const char* s, const char* t TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:84:62: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 84 | extern char* apc_substr(const char* s, int start, int length TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:85:54: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 85 | extern char** apc_tokenize(const char* s, char delim TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:96:94: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 96 | extern int apc_search_paths(const char* filename, const char* path, apc_fileinfo_t* fileinfo TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:99:55: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 99 | extern void* apc_regex_compile_array(char* patterns[] TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.h:100:45: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 100 | extern void apc_regex_destroy_array(void* p TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc.c:35: /var/tmp/APC/apc_zend.h:79:38: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 79 | extern void* apc_php_malloc(size_t n TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_zend.h:80:34: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 80 | extern void apc_php_free(void* p TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_zend.h:82:1: warning: parameter names (without types) in function declaration 82 | extern void apc_zend_init(TSRMLS_D); | ^~~~~~ /var/tmp/APC/apc_zend.h:83:1: warning: parameter names (without types) in function declaration 83 | extern void apc_zend_shutdown(TSRMLS_D); | ^~~~~~ In file included from /var/tmp/APC/apc_pool.h:34, from /var/tmp/APC/apc_main.h:37, from /var/tmp/APC/apc_compile.h:43, from /var/tmp/APC/apc_cache.h:40, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_sma.h:49:75: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 49 | extern void apc_sma_init(int numseg, size_t segsize, char *mmap_file_mask TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:50:1: warning: parameter names (without types) in function declaration 50 | extern void apc_sma_cleanup(TSRMLS_D); | ^~~~~~ /var/tmp/APC/apc_sma.h:51:41: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 51 | extern void* apc_sma_malloc(size_t size TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:52:80: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 52 | extern void* apc_sma_malloc_ex(size_t size, size_t fragment, size_t* allocated TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:53:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 53 | extern void* apc_sma_realloc(void* p, size_t size TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:54:43: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 54 | extern char* apc_sma_strdup(const char *s TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:55:34: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 55 | extern void apc_sma_free(void* p TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:81:55: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 81 | extern apc_sma_info_t* apc_sma_info(zend_bool limited TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sma.h:82:52: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 82 | extern void apc_sma_free_info(apc_sma_info_t* info TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc_main.h:37, from /var/tmp/APC/apc_compile.h:43, from /var/tmp/APC/apc_cache.h:40, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_pool.h:63:48: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 63 | typedef void (*apc_pcleanup_t)(apc_pool *pool TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pool.h:65:59: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 65 | typedef void* (*apc_palloc_t)(apc_pool *pool, size_t size TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pool.h:66:55: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 66 | typedef void (*apc_pfree_t) (apc_pool *pool, void* p TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pool.h:77:5: error: unknown type name ‘apc_palloc_t’ 77 | apc_palloc_t palloc; | ^~~~~~~~~~~~ /var/tmp/APC/apc_pool.h:78:5: error: unknown type name ‘apc_pfree_t’ 78 | apc_pfree_t pfree; | ^~~~~~~~~~~ /var/tmp/APC/apc_pool.h:83:5: error: unknown type name ‘apc_pcleanup_t’ 83 | apc_pcleanup_t cleanup; | ^~~~~~~~~~~~~~ /var/tmp/APC/apc_pool.h:107:57: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 107 | TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pool.h:109:45: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 109 | extern void apc_pool_destroy(apc_pool* pool TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pool.h:111:66: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 111 | extern void* apc_pmemcpy(const void* p, size_t n, apc_pool* pool TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pool.h:112:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 112 | extern void* apc_pstrdup(const char* s, apc_pool* pool TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc_main.h:38, from /var/tmp/APC/apc_compile.h:43, from /var/tmp/APC/apc_cache.h:40, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_serializer.h:29:99: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 29 | #define APC_SERIALIZER_ARGS unsigned char **buf, size_t *buf_len, const zval *value, void *config TSRMLS_DC | ^~~~~~~~~ /var/tmp/APC/apc_serializer.h:32:32: note: in expansion of macro ‘APC_SERIALIZER_ARGS’ 32 | typedef int (*apc_serialize_t)(APC_SERIALIZER_ARGS); | ^~~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc_serializer.h:30:94: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 30 | #define APC_UNSERIALIZER_ARGS zval **value, unsigned char *buf, size_t buf_len, void *config TSRMLS_DC | ^~~~~~~~~ /var/tmp/APC/apc_serializer.h:33:34: note: in expansion of macro ‘APC_UNSERIALIZER_ARGS’ 33 | typedef int (*apc_unserialize_t)(APC_UNSERIALIZER_ARGS); | ^~~~~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc_serializer.h:36:41: error: unknown type name ‘apc_serialize_t’ 36 | apc_serialize_t serialize, | ^~~~~~~~~~~~~~~ /var/tmp/APC/apc_serializer.h:37:41: error: unknown type name ‘apc_unserialize_t’; did you mean ‘zend_unserialize_data’? 37 | apc_unserialize_t unserialize, | ^~~~~~~~~~~~~~~~~ | zend_unserialize_data /var/tmp/APC/apc_serializer.h:38:54: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 38 | void *config TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_serializer.h:56:37: error: unknown type name ‘apc_serialize_t’ 56 | apc_serialize_t serialize, | ^~~~~~~~~~~~~~~ /var/tmp/APC/apc_serializer.h:57:37: error: unknown type name ‘apc_unserialize_t’; did you mean ‘zend_unserialize_data’? 57 | apc_unserialize_t unserialize, | ^~~~~~~~~~~~~~~~~ | zend_unserialize_data /var/tmp/APC/apc_serializer.h:58:50: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 58 | void *config TSRMLS_DC) | ^~~~~~~~~ In file included from /var/tmp/APC/apc_compile.h:43, from /var/tmp/APC/apc_cache.h:40, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_main.h:44:46: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 44 | extern int apc_module_init(int module_number TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_main.h:45:1: warning: parameter names (without types) in function declaration 45 | extern int apc_module_shutdown(TSRMLS_D); | ^~~~~~ /var/tmp/APC/apc_main.h:46:47: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 46 | extern int apc_process_init(int module_number TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_main.h:47:1: warning: parameter names (without types) in function declaration 47 | extern int apc_process_shutdown(TSRMLS_D); | ^~~~~~ /var/tmp/APC/apc_main.h:48:1: warning: parameter names (without types) in function declaration 48 | extern int apc_request_init(TSRMLS_D); | ^~~~~~ /var/tmp/APC/apc_main.h:49:1: warning: parameter names (without types) in function declaration 49 | extern int apc_request_shutdown(TSRMLS_D); | ^~~~~~ /var/tmp/APC/apc_main.h:70:5: error: unknown type name ‘apc_serialize_t’ 70 | apc_serialize_t serialize; | ^~~~~~~~~~~~~~~ /var/tmp/APC/apc_main.h:71:5: error: unknown type name ‘apc_unserialize_t’ 71 | apc_unserialize_t unserialize; | ^~~~~~~~~~~~~~~~~ /var/tmp/APC/apc_main.h:76:1: warning: parameter names (without types) in function declaration 76 | apc_serializer_t* apc_get_serializers(TSRMLS_D); | ^~~~~~~~~~~~~~~~ /var/tmp/APC/apc_main.h:77:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 77 | apc_serializer_t* apc_find_serializer(const char* name TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc_cache.h:40, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_compile.h:91:101: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 91 | extern zend_op_array* apc_copy_op_array(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:92:113: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 92 | extern zend_class_entry* apc_copy_class_entry(zend_class_entry* dst, zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:93:82: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 93 | extern apc_function_t* apc_copy_new_functions(int old_count, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:94:102: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 94 | extern apc_class_t* apc_copy_new_classes(zend_op_array* op_array, int old_count, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:95:76: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 95 | extern zval* apc_copy_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:115:115: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 115 | extern zend_op_array* apc_copy_op_array_for_execution(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:116:95: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 116 | extern zend_function* apc_copy_function_for_execution(zend_function* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:117:104: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 117 | extern zend_class_entry* apc_copy_class_entry_for_execution(zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:124:72: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 124 | extern void apc_free_class_entry_after_execution(zend_class_entry* src TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:130:89: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 130 | extern apc_optimize_function_t apc_register_optimizer(apc_optimize_function_t optimizer TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:135:48: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 135 | long apc_file_halt_offset(const char* filename TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:136:75: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 136 | void apc_do_halt_compiler_register(const char *filename, long halt_offset TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc_main.h:38, from /var/tmp/APC/apc_compile.h:43, from /var/tmp/APC/apc_cache.h:40, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_serializer.h:29:99: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 29 | #define APC_SERIALIZER_ARGS unsigned char **buf, size_t *buf_len, const zval *value, void *config TSRMLS_DC | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:141:31: note: in expansion of macro ‘APC_SERIALIZER_ARGS’ 141 | int APC_SERIALIZER_NAME(php) (APC_SERIALIZER_ARGS); | ^~~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc_serializer.h:30:94: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 30 | #define APC_UNSERIALIZER_ARGS zval **value, unsigned char *buf, size_t buf_len, void *config TSRMLS_DC | ^~~~~~~~~ /var/tmp/APC/apc_compile.h:142:33: note: in expansion of macro ‘APC_UNSERIALIZER_ARGS’ 142 | int APC_UNSERIALIZER_NAME(php) (APC_UNSERIALIZER_ARGS); | ^~~~~~~~~~~~~~~~~~~~~ In file included from /var/tmp/APC/apc_lock.h:40, from /var/tmp/APC/apc_cache.h:41, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_sem.h:35:49: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 35 | extern int apc_sem_create(int proj, int initval TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sem.h:37:36: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 37 | extern void apc_sem_lock(int semid TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sem.h:38:47: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 38 | extern int apc_sem_nonblocking_lock(int semid TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sem.h:39:38: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 39 | extern void apc_sem_unlock(int semid TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sem.h:40:45: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 40 | extern void apc_sem_wait_for_zero(int semid TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_sem.h:41:40: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 41 | extern int apc_sem_get_value(int semid TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc_lock.h:41, from /var/tmp/APC/apc_cache.h:41, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_fcntl.h:35:50: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 35 | extern int apc_fcntl_create(const char* pathname TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_fcntl.h:37:35: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 37 | extern void apc_fcntl_lock(int fd TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_fcntl.h:38:37: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 38 | extern void apc_fcntl_rdlock(int fd TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_fcntl.h:39:37: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 39 | extern void apc_fcntl_unlock(int fd TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_fcntl.h:40:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 40 | extern unsigned char apc_fcntl_nonblocking_lock(int fd TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc_lock.h:42, from /var/tmp/APC/apc_cache.h:41, from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_pthreadmutex.h:31:64: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 31 | pthread_mutex_t *apc_pthreadmutex_create(pthread_mutex_t *lock TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pthreadmutex.h:33:50: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 33 | void apc_pthreadmutex_lock(pthread_mutex_t *lock TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pthreadmutex.h:34:52: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 34 | void apc_pthreadmutex_unlock(pthread_mutex_t *lock TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_pthreadmutex.h:35:67: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 35 | zend_bool apc_pthreadmutex_nonblocking_lock(pthread_mutex_t *lock TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_cache.h:173:62: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 173 | extern T apc_cache_create(int size_hint, int gc_ttl, int ttl TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:180:39: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 180 | extern void apc_cache_destroy(T cache TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:186:37: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 186 | extern void apc_cache_clear(T cache TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:201:85: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 201 | apc_cache_entry_t* value, apc_context_t* ctxt, time_t t TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:204:100: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 204 | apc_cache_entry_t* value, apc_context_t* ctxt, time_t t, int exclusive TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:207:104: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 207 | apc_cache_entry_t** values, apc_context_t *ctxt, time_t t, int num_entries TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:215:81: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 215 | extern apc_cache_entry_t* apc_cache_find(T cache, apc_cache_key_t key, time_t t TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:222:91: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 222 | extern apc_cache_entry_t* apc_cache_user_find(T cache, char* strkey, int keylen, time_t t TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:231:93: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 231 | extern apc_cache_entry_t* apc_cache_user_exists(T cache, char* strkey, int keylen, time_t t TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:236:82: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 236 | extern int apc_cache_delete(apc_cache_t* cache, char *filename, int filename_len TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:237:79: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 237 | extern int apc_cache_user_delete(apc_cache_t* cache, char *strkey, int keylen TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:243:76: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 243 | zval* apc_cache_fetch_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:254:65: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 254 | extern void apc_cache_release(T cache, apc_cache_entry_t* entry TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:276:36: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 276 | TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:287:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 287 | TSRMLS_DC); | ^~~~~~~~~ In file included from /var/tmp/APC/apc.c:36: /var/tmp/APC/apc_cache.h:290:161: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 290 | zend_bool apc_compile_cache_entry(apc_cache_key_t key, zend_file_handle* h, int type, time_t t, zend_op_array** op_array_pp, apc_cache_entry_t** cache_entry_pp TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:296:146: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 296 | extern apc_cache_entry_t* apc_cache_make_user_entry(const char* info, int info_len, const zval *val, apc_context_t* ctxt, const unsigned int ttl TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:332:52: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 332 | typedef void (*apc_expunge_cb_t)(T cache, size_t n TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:342:5: error: unknown type name ‘apc_expunge_cb_t’ 342 | apc_expunge_cb_t expunge_cb; /* cache specific expunge callback to free up sma memory */ | ^~~~~~~~~~~~~~~~ /var/tmp/APC/apc_cache.h:347:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 347 | extern zval* apc_cache_info(T cache, zend_bool limited TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:348:49: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 348 | extern void apc_cache_unlock(apc_cache_t* cache TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:350:58: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 350 | extern zend_bool apc_cache_write_lock(apc_cache_t* cache TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:351:55: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 351 | extern void apc_cache_write_unlock(apc_cache_t* cache TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:352:91: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 352 | extern zend_bool apc_cache_is_last_key(apc_cache_t* cache, apc_cache_key_t* key, time_t t TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc_cache.h:358:77: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 358 | apc_cache_updater_t updater, void* data TSRMLS_DC); | ^~~~~~~~~ /var/tmp/APC/apc.c:53:28: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 53 | void* apc_emalloc(size_t n TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:63:38: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 63 | void* apc_erealloc(void* p, size_t n TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:73:24: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 73 | void apc_efree(void* p TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:82:43: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 82 | char* APC_ALLOC apc_estrdup(const char* s TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:101:59: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 101 | void* APC_ALLOC apc_xstrdup(const char* s, apc_malloc_t f TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:106:69: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 106 | void* APC_ALLOC apc_xmemcpy(const void* p, size_t n, apc_malloc_t f TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:127:44: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 127 | void apc_##name(const char *format TSRMLS_DC, ...) \ | ^~~~~~~~~ /var/tmp/APC/apc.c:136:1: note: in expansion of macro ‘APC_PRINT_FUNCTION’ 136 | APC_PRINT_FUNCTION(error, E_ERROR) | ^~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc.c:127:44: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 127 | void apc_##name(const char *format TSRMLS_DC, ...) \ | ^~~~~~~~~ /var/tmp/APC/apc.c:137:1: note: in expansion of macro ‘APC_PRINT_FUNCTION’ 137 | APC_PRINT_FUNCTION(warning, E_WARNING) | ^~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc.c:127:44: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 127 | void apc_##name(const char *format TSRMLS_DC, ...) \ | ^~~~~~~~~ /var/tmp/APC/apc.c:138:1: note: in expansion of macro ‘APC_PRINT_FUNCTION’ 138 | APC_PRINT_FUNCTION(notice, E_NOTICE) | ^~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc.c:143:35: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 143 | void apc_debug(const char *format TSRMLS_DC, ...) {} | ^~~~~~~~~ /var/tmp/APC/apc.c:149:47: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 149 | char* apc_append(const char* s, const char* t TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:165:55: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 165 | char* apc_substr(const char* s, int start, int length TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:189:47: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 189 | char** apc_tokenize(const char* s, char delim TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:262:48: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 262 | static int apc_restat(apc_fileinfo_t *fileinfo TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:297:87: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 297 | int apc_search_paths(const char* filename, const char* path, apc_fileinfo_t* fileinfo TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c:493:48: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 493 | void* apc_regex_compile_array(char* patterns[] TSRMLS_DC) | ^~~~~~~~~ /var/tmp/APC/apc.c: In function ‘apc_flip_hash’: /var/tmp/APC/apc.c:630:5: warning: implicit declaration of function ‘MAKE_STD_ZVAL’ [-Wimplicit-function-declaration] 630 | MAKE_STD_ZVAL(data); | ^~~~~~~~~~~~~ /var/tmp/APC/apc.c:637:48: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types] 637 | while (zend_hash_get_current_data_ex(hash, (void **)&entry, &pos) == SUCCESS) { | ^~~~~~~~~~~~~~~ | | | void ** In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:235:89: note: expected ‘HashPosition *’ {aka ‘unsigned int *’} but argument is of type ‘void **’ 235 | ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos); | ~~~~~~~~~~~~~~^~~ /var/tmp/APC/apc.c:637:12: error: too many arguments to function ‘zend_hash_get_current_data_ex’ 637 | while (zend_hash_get_current_data_ex(hash, (void **)&entry, &pos) == SUCCESS) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:235:30: note: declared here 235 | ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc.c:638:12: warning: implicit declaration of function ‘Z_TYPE_PP’; did you mean ‘Z_TYPE_P’? [-Wimplicit-function-declaration] 638 | if(Z_TYPE_PP(entry) == IS_STRING) { | ^~~~~~~~~ | Z_TYPE_P /var/tmp/APC/apc.c:639:40: warning: implicit declaration of function ‘Z_STRVAL_PP’; did you mean ‘Z_STRVAL_P’? [-Wimplicit-function-declaration] 639 | zend_hash_update(new_hash, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) +1, &data, sizeof(data), NULL); | ^~~~~~~~~~~ | Z_STRVAL_P /var/tmp/APC/apc.c:639:60: warning: implicit declaration of function ‘Z_STRLEN_PP’; did you mean ‘Z_STRLEN_P’? [-Wimplicit-function-declaration] 639 | zend_hash_update(new_hash, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) +1, &data, sizeof(data), NULL); | ^~~~~~~~~~~ | Z_STRLEN_P /var/tmp/APC/apc.c:639:40: warning: passing argument 2 of ‘zend_hash_update’ makes pointer from integer without a cast [-Wint-conversion] 639 | zend_hash_update(new_hash, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) +1, &data, sizeof(data), NULL); | ^~~~~~~~~~~~~~~~~~ | | | int In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:117:75: note: expected ‘zend_string *’ {aka ‘struct _zend_string *’} but argument is of type ‘int’ 117 | ZEND_API zval* ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key,zval *pData); | ~~~~~~~~~~~~~^~~ /var/tmp/APC/apc.c:639:79: warning: passing argument 3 of ‘zend_hash_update’ makes pointer from integer without a cast [-Wint-conversion] 639 | zend_hash_update(new_hash, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) +1, &data, sizeof(data), NULL); | ~~~~~~~~~~~~~~~~~~~^~ | | | int In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:117:85: note: expected ‘zval *’ {aka ‘struct _zval_struct *’} but argument is of type ‘int’ 117 | ZEND_API zval* ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key,zval *pData); | ~~~~~~^~~~~ /var/tmp/APC/apc.c:639:13: error: too many arguments to function ‘zend_hash_update’ 639 | zend_hash_update(new_hash, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) +1, &data, sizeof(data), NULL); | ^~~~~~~~~~~~~~~~ In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:117:30: note: declared here 117 | ZEND_API zval* ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key,zval *pData); | ^~~~~~~~~~~~~~~~ /var/tmp/APC/apc.c:641:46: warning: implicit declaration of function ‘Z_LVAL_PP’; did you mean ‘Z_LVAL_P’? [-Wimplicit-function-declaration] 641 | zend_hash_index_update(new_hash, Z_LVAL_PP(entry), &data, sizeof(data), NULL); | ^~~~~~~~~ | Z_LVAL_P /var/tmp/APC/apc.c:641:64: warning: passing argument 3 of ‘zend_hash_index_update’ from incompatible pointer type [-Wincompatible-pointer-types] 641 | zend_hash_index_update(new_hash, Z_LVAL_PP(entry), &data, sizeof(data), NULL); | ^~~~~ | | | zval ** {aka struct _zval_struct **} In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:131:88: note: expected ‘zval *’ {aka ‘struct _zval_struct *’} but argument is of type ‘zval **’ {aka ‘struct _zval_struct **’} 131 | ZEND_API zval* ZEND_FASTCALL zend_hash_index_update(HashTable *ht, zend_ulong h, zval *pData); | ~~~~~~^~~~~ /var/tmp/APC/apc.c:641:13: error: too many arguments to function ‘zend_hash_index_update’ 641 | zend_hash_index_update(new_hash, Z_LVAL_PP(entry), &data, sizeof(data), NULL); | ^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/php/Zend/zend.h:33, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_hash.h:131:30: note: declared here 131 | ZEND_API zval* ZEND_FASTCALL zend_hash_index_update(HashTable *ht, zend_ulong h, zval *pData); | ^~~~~~~~~~~~~~~~~~~~~~ /var/tmp/APC/apc.c:646:19: warning: passing argument 1 of ‘zval_ptr_dtor’ from incompatible pointer type [-Wincompatible-pointer-types] 646 | zval_ptr_dtor(&data); | ^~~~~ | | | zval ** {aka struct _zval_struct **} In file included from /usr/include/php/Zend/zend.h:36, from /usr/include/php/main/php.h:31, from /var/tmp/APC/apc.h:61, from /var/tmp/APC/apc.c:34: /usr/include/php/Zend/zend_variables.h:79:35: note: expected ‘zval *’ {aka ‘struct _zval_struct *’} but argument is of type ‘zval **’ {aka ‘struct _zval_struct **’} 79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr); | ~~~~~~^~~~~~~~ make: *** [Makefile:210: apc.lo] Error 1 ERROR: make' failed
pecl install APC の実行中に大量の TSRMLS_DC 関連エラーや expected ‘;’, ‘,’ or ‘)’ などのエラーが出ていますが、 PHPのバージョンと APC が非互換 であることが原因です。
APCは PHP 5.x 用のキャッシュ拡張モジュール です。
PHP7以降では opcache が標準搭載 されており、APC は非推奨になりました。APC を PHP 7 以降でコンパイルしようとすると、古い TSRMLS_DC マクロが原因でエラーになります。導入する場合はAPCuを入れます。関数もapc_*をapcu_*に書き換えます。
sudo dnf install php-pecl-apcu -y または sudo pecl install apcu php -m | grep apcu #確認。php.iniに記述は不要 php.iniに記載する場合の例 [apcu] extension=apcu.so apc.enabled=1 apc.shm_size=64M apc.ttl=3600 apc.gc_ttl=600 apc.enable_cli=1
PHP 8.0 以降なら opcache を使用します。
PHP 7 以降では opcache が標準で組み込まれており、APC の opcode cache は不要です。
sudo dnf install php-opcache -y php.ini zend_extension=opcache.so opcache.enable=1 opcache.memory_consumption=128 opcache.max_accelerated_files=10000 opcache.revalidate_freq=60 sudo systemctl restart php-fpm
以下のようなエラーについて。
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib64/php/modules/pdo_mysql (/usr/lib64/php/modules/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/pdo_mysql.so (/usr/lib64/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib64/php/modules/pdo_sqlite (/usr/lib64/php/modules/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/pdo_sqlite.so (/usr/lib64/php/modules/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver)) in Unknown on line 0 pdo_mysql pdo_sqlite
php.iniの記述のせいでpdoのモジュール読み込みが混乱しているのが問題なので
extension=pdo_mysql extension=pdo_sqlite extension=pdo.so extension=pdo_mysql.so
のような記述を消します。
Let’s Encrypt
WinSCPなどファイル転送ソフトを使ってコピーするとシンボリックリンクが壊れて使えなくなるので、rsyncで同期する。
rsync -avz -e "ssh -i ~/.ssh/id_rsa" [remote-server]:/etc/letsencrypt/ /etc/letsencrypt/ #[remote-server]は旧サーバアドレス
コメント