doucan4873 2015-05-09 20:13
浏览 87
已采纳

我可以依赖php扩展存储在/ usr / lib / php5 / 20121212中

I'm creating an ansible role that installs a pear module (pam). I want the role to check if the module is already installed using a creates= clause.

This module installs itself in /usr/lib/php5/20121212/pam.so but it feels a bit shaky to rely on that. What is a better way to find out where the php extension modules are stored?

  • 写回答

1条回答 默认 最新

  • dqsw7529 2015-05-09 21:01
    关注

    No, it's not safe to make assumptions about the install location. The PHP module API number changes with each PHP major version. For instance, 20121212 is the API number used for PHP 5.5. Additionally, the exact path will change based on configuration. For instance, my PHP 5.5 system stores extensions in /usr/lib/php/extensions/no-debug-non-zts-20121212.

    To get the default extension install location for a specific version of PHP, run php-config --extension-dir, using the php-config binary installed for that PHP version.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog