How to enable php extension using `phpize`?

混江龙づ霸主 提交于 2019-11-27 16:56:19

问题


I tried these steps on different extensions but I don't know why that doesn't work. Shouldn't I see a change in phpinfo() output after that?

The steps:

  1. Decompress the php source code and change directory to ext/ext_name
  2. phpize
  3. configure
  4. make
  5. move manually the "ext_name.so" file from "../.lib" directory to "extension_dir" specified in "php.ini" file. (or do make install )
  6. restart web service

Is there something missing? I need to enable a certain extension in php and there's no way to recompile the whole php version..


回答1:


If the .so is properly compiled etc, and it's in your extension dir, then you need to add the following line also:

extension=NAME.so

This will force the loading. At this point, provided there is actually something to display, it will show in phpinfo().



来源:https://stackoverflow.com/questions/6200994/how-to-enable-php-extension-using-phpize

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!