Closed thatseason closed 5 years ago
php的error info是啥?
php的error info是啥?
什么也没有,直接502,xdebug也是在第一行就卡住了,没任何信息
系统中有core的信息么?
系统中core的信息么?
version: 1 creator: xdebug 2.7.2 (PHP 7.2.6) cmd: /home/wwwroot/www.xxx.com/test.php part: 1 positions: line
events: Time Memory
fl=(1) php:internal fn=(1) php::opencc_open 2 15488 24
只有这些
我的意思是看下是否有php coredump了,你上面贴的日志是在cli模式下运行的么?
我的意思是看下是否有php coredump了,你上面贴的日志是在cli模式下运行的么?
Missing separate debuginfo for /lib/libjpeg.so.62 Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/16/e593c00b05d25f61db68c4e1554cad370da0c0.debug [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Core was generated by `/usr/local/php7.2/bin/php /home/wwwroot/www.xxx.com/test.php'. Program terminated with signal 11, Segmentation fault.
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 cyrus-sasl-lib-2.1.26-23.el7.x86_64 glibc-2.17-260.el7_6.3.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-37.el7_6.x86_64 libcom_err-1.42.9-13.el7.x86_64 libcurl-7.29.0-51.el7.x86_64 libgcc-4.8.5-36.el7.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libicu-50.1.2-17.el7.x86_64 libidn-1.28-4.el7.x86_64 libselinux-2.5-14.1.el7.x86_64 libssh2-1.4.3-10.el7_2.1.x86_64 libstdc++-4.8.5-36.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 libxslt-1.1.28-5.el7.x86_64 nspr-4.19.0-1.el7_5.x86_64 nss-3.36.0-7.1.el7_6.x86_64 nss-softokn-freebl-3.36.0-5.el7_5.x86_64 nss-util-3.36.0-1.1.el7_6.x86_64 openldap-2.4.44-13.el7.x86_64 openssl-libs-1.0.2k-16.el7.x86_64 pcre-8.32-17.el7.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64 (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) bt
at /root/opencc4php/opencc.c:152
at /root/xdebug-2.7.2/xdebug.c:2050
at /root/lnmp1.5/src/php-7.2.6/Zend/zend_vm_execute.h:63760
at /root/lnmp1.5/src/php-7.2.6/Zend/zend.c:1496
at /root/lnmp1.5/src/php-7.2.6/main/main.c:2590
我不会用这个工具,这是现从网上搜索过来的,你看是不是需要这些信息?
能把你的测试的php代码发出来么?
能把你的测试的php代码发出来么?
`<?php $od = opencc_open("s2t.json"); //传入配置文件名
$text = opencc_convert("我鼠标哪儿去了。", $od); echo $text; opencc_close($od);`
你的文本是GB2312编码的?这个会导致core
你的文本是GB2312编码的?这个会导致core
是的 GB2312,以前我也安装过一次 那会也是这个编码 当时使用没问题啊 现在怎么办?
已经知道问题了,我还是先把文件编码转成UTF8好了,谢谢~~
@thatseason 使用 iconv 先转换下编码 https://www.php.net/manual/zh/function.iconv.php。
Thanks @pkujhd
[root@localhost ~]# opencc --version
Open Chinese Convert (OpenCC) Command Line Tool Version: 1.0.5
[root@localhost ~]# echo '嚴格區分「一簡對多繁」和「一簡對多異」' | opencc -c t2s 严格区分「一简对多繁」和「一简对多异」
php-fpm日志 WARNING: [pool www] child 42340 exited on signal 11 (SIGSEGV) after 0.842551 seconds from start
phpinfo里也有opencc扩展,但是在传入配置文件的时候就会直接502,PHP版本7.2