nauxliu / opencc4php

简繁体转换 PHP 扩展
MIT License
457 stars 86 forks source link

添加模块后,启动php-fpm时出错 #20

Closed miaoyaoyao closed 7 years ago

miaoyaoyao commented 8 years ago

安装后修改php.ini加入extension=opencc.so。重启php-fpm,然后出现如下问题:

21-Jul-2016 11:08:57] NOTICE: PHP message: PHP Warning:  PHP Startup: opencc: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: opencc: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in <b>Unknown</b> on line <b>0</b><br />
acgrid commented 7 years ago

扩展和PHP的版本不对,既然是.so自己编译一份就好了(如果你的PHP不是编译安装的可能要看具体情况弄一个开发环境)