How was my running php compiled?

a 夏天 提交于 2019-11-29 17:32:39

问题


I'm trying to compile a new instance of PHP (5.4.0) from the source code and want to keep compatibility with the one (PHP 5.3.6-13ubuntu3.6) already installed from the distro, Ubuntu-11.10. That is, I want to run ./configure with the same directives as the installed PHP.

I always could see the ./configure command outputted by phpinfo() but this time, for my surprise, it's not provided.

Do you know of any flag that prevent phpinfo of outputting the compile configuration? Or,

Do you know of any other way to get how PHP was compiled?


回答1:


There should be a script php-config you can install on ubuntu to get the configure parameters used for php.

sudo apt-get install php5-dev
php-config  --configure-options



回答2:


According to this bug report, the Configure Command output was intentionally suppressed from Ubuntu & Debian PHP builds.

Then recommend installing the source package via apt-get source php5:

If you want to see how PHP is built in Ubuntu, apt-get source php5, and peruse debian/rules, the ./configure output in phpinfo() is, as the changelog for the patch states, entirely misleading and not terribly informative.



来源:https://stackoverflow.com/questions/9534116/how-was-my-running-php-compiled

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