YanteSoft 发表于 2023-12-2 18:51:35

安装php8.1的fileinfo扩展时服务器卡死无响应

面板、插件版本:企业版8.0.4
系统版本:阿里云2H2G Ubuntu 22.04.3 LTS x86 64(Py3.7.8)
问题描述:安装php8.1的fileinfo扩展服务器进入假死状态,现象:服务器80端口无响应(全部网页打不开,有时候503),ssh连不上一直等待服务器,宝塔面板加载不出来,在阿里云后台强制重启,任务重新安装fileinfo,进入死循环,且重启后阿帕奇第一次启动肯定失败,手动重启后第一次一般也是失败,再次重启后可以正常。
相关截图(日志、错误):消息盒子日志看不到,重启后打开消息盒子必须最快速度删除任务,否则就会循环进入卡死状态
已经尝试过卸载php8.0和8.1重新安装,编译和极速都试了,重装php后安装fileinfo扩展故障依旧,另外尝试8.0以下版本php安装fileinfo正常,本人不太懂linux,如需要更详细日志才能判断可以告知方法我去取。

长蘑菇的小内内 发表于 2024-2-25 22:29:17

我也是有这样的问题,我用这个方法安装成功的:
【其中的版本号数字换成自己的就行了】
cd /www/server/php/82/src/ext/fileinfo/
/www/server/php/82/bin/phpize
./configure --with-php-config=/www/server/php/82/bin/php-config
sed -i "s#CFLAGS = -g -O2#CFLAGS = -std=c99 -g#g" Makefile
make && make install
echo "extension=/www/server/php/82/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so" >> /www/server/php/82/etc/php.ini
echo "extension=/www/server/php/82/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so" >> /www/server/php/812/etc/php-cli.ini
/etc/init.d/php-fpm-82 restart

YanteSoft 发表于 2023-12-2 19:25:53

已经尝试卸载php重新安装,故障依旧

YanteSoft 发表于 2023-12-2 18:56:44

本帖最后由 YanteSoft 于 2023-12-2 18:59 编辑

通过阿里云后台监控看到,卡死期间硬盘读取特别高100M字节/s,写入并不高300k字节/s,cpu占用约20~40%

YanteSoft 发表于 2023-12-2 19:38:46

php8.0以下版本安装没问题,8.0以上版本安装日志到这里服务器就会卡死

YanteSoft 发表于 2023-12-4 14:11:38

别沉呀,宝塔官方来看看啥情况ok不:'(

长蘑菇的小内内 发表于 2024-2-25 22:32:12

这样设置也可以安装:

宝塔用户_ozpttg 发表于 2024-5-14 10:39:10

啊,我也遇到一模一样的问题了,有解决办法吗

宝塔用户_ozpttg 发表于 2024-5-14 11:05:18

长蘑菇的小内内 发表于 2024-2-25 22:29
我也是有这样的问题,我用这个方法安装成功的:
【其中的版本号数字换成自己的就行了】
...

感谢,亲测有效

堡塔运维南一 发表于 2024-5-17 15:04:50

您好,私信发一下您的面板登录信息,我帮你看看

yxmcn 发表于 2024-6-16 22:33:39

长蘑菇的小内内 发表于 2024-2-25 22:29
我也是有这样的问题,我用这个方法安装成功的:
【其中的版本号数字换成自己的就行了】
...

为什么我还是不行,https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=134189&extra=page%3D1%26filter%3Dtypeid%26typeid%3D8
到make && make install这步,依然是
/bin/sh /www/server/php/82/src/ext/fileinfo/libtool --tag=CC --mode=compile cc -I. -I/www/server/php/82/src/ext/fileinfo -I/www/server/php/82/src/ext/fileinfo/include -I/www/server/php/82/src/ext/fileinfo/main -I/www/server/php/82/src/ext/fileinfo -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSRM -I/www/server/php/82/include/php/Zend -I/www/server/php/82/include/php/ext -I/www/server/php/82/include/php/ext/date/lib-DHAVE_CONFIG_H-std=c99 -g -D_GNU_SOURCE   -I/www/server/php/82/src/ext/fileinfo/libmagic -DZEND_COMPILE_DL_EXT=1 -c /www/server/php/82/src/ext/fileinfo/libmagic/apprentice.c -o libmagic/apprentice.lo-MMD -MF libmagic/apprentice.dep -MT libmagic/apprentice.lo
cc -I. -I/www/server/php/82/src/ext/fileinfo -I/www/server/php/82/src/ext/fileinfo/include -I/www/server/php/82/src/ext/fileinfo/main -I/www/server/php/82/src/ext/fileinfo -I/www/server/php/82/include/php -I/www/server/php/82/include/php/main -I/www/server/php/82/include/php/TSRM -I/www/server/php/82/include/php/Zend -I/www/server/php/82/include/php/ext -I/www/server/php/82/include/php/ext/date/lib -DHAVE_CONFIG_H -std=c99 -g -D_GNU_SOURCE -I/www/server/php/82/src/ext/fileinfo/libmagic -DZEND_COMPILE_DL_EXT=1 -c /www/server/php/82/src/ext/fileinfo/libmagic/apprentice.c -MMD -MF libmagic/apprentice.dep -MT libmagic/apprentice.lo-fPIC -DPIC -o libmagic/.libs/apprentice.o

这个地方卡死

yxmcn 发表于 2024-6-16 22:59:27


哎,咪咪疼

宝塔用户_yszhef 发表于 3 天前

怎么解决的
页: [1]
查看完整版本: 安装php8.1的fileinfo扩展时服务器卡死无响应