如何使用`phpize`启用php扩展? [英] How to enable php extension using `phpize`?

查看:88
本文介绍了如何使用`phpize`启用php扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在不同的扩展程序上尝试了这些步骤,但是我不知道为什么这不起作用.在那之后我不应该在phpinfo()输出中看到变化吗?

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?

步骤:

  1. 解压缩php源代码并将目录更改为ext/ext_name
  2. phpize
  3. configure
  4. make
  5. 将"ext_name.so"文件从"../.lib"目录手动移动到"php.ini"文件中指定的"extension_dir". (或执行make install)
  6. 重新启动Web服务
  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

是否缺少某些内容?我需要在php中启用某个扩展名,并且无法重新编译整个php版本..

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

推荐答案

如果.so已正确编译等,并且在扩展目录中,则还需要添加以下行:

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

这将强制加载.此时,只要有实际要显示的内容,它将显示在phpinfo()中.

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

这篇关于如何使用`phpize`启用php扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆