首页 > 编程语言 >php:查看安装时的编译参数(php 8.2.5)

php:查看安装时的编译参数(php 8.2.5)

时间:2023-09-02 22:15:20浏览次数:75  
标签:8.2 -- soft php8.2 编译 enable php local

一,用-i参数

[liuhongdi@img ~]$ /usr/local/soft/php8.2.5/bin/php -i | grep configure
Configure Command =>  './configure'  '--prefix=/usr/local/soft/php8.2.5' '--with-config-file-path=/usr/local/soft/php8.2.5/etc' '--with-curl' '--with-freetype' '--enable-gd' '--with-jpeg' '--with-gettext' '--with-kerberos' '--with-libdir=lib64' '--with-libxml' '--with-mysqli' '--with-openssl' '--with-pdo-mysql' '--with-pdo-sqlite' '--with-pear' '--enable-sockets' '--with-mhash' '--with-ldap-sasl' '--with-xsl' '--with-zlib' '--with-zip' '-with-bz2' '--with-iconv' '--enable-fpm' '--enable-pdo' '--enable-bcmath' '--enable-mbregex' '--enable-mbstring' '--enable-opcache' '--enable-pcntl' '--enable-shmop' '--enable-soap' '--enable-ftp' '--with-xpm' '--enable-xml' '--enable-sysvsem' '--enable-cli' '--enable-intl' '--enable-calendar' '--enable-static' '--enable-ctype' '--enable-mysqlnd' '--enable-session’

二,用php-config

[liuhongdi@img ~]$ /usr/local/soft/php8.2.5/bin/php-config --configure-options
--prefix=/usr/local/soft/php8.2.5 --with-config-file-path=/usr/local/soft/php8.2.5/etc --with-curl --with-freetype --enable-gd --with-jpeg --with-gettext --with-kerberos --with-libdir=lib64 --with-libxml --with-mysqli --with-openssl --with-pdo-mysql --with-pdo-sqlite --with-pear --enable-sockets --with-mhash --with-ldap-sasl --with-xsl --with-zlib --with-zip -with-bz2 --with-iconv --enable-fpm --enable-pdo --enable-bcmath --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-ftp --with-xpm --enable-xml --enable-sysvsem --enable-cli --enable-intl --enable-calendar --enable-static --enable-ctype --enable-mysqlnd --enable-session

三,直接执行phpinfo()函数:

[liuhongdi@img ~]$ /usr/local/soft/php8.2.5/bin/php -r "phpinfo();" | grep Configure
Configure Command =>  './configure'  '--prefix=/usr/local/soft/php8.2.5' '--with-config-file-path=/usr/local/soft/php8.2.5/etc' '--with-curl' '--with-freetype' '--enable-gd' '--with-jpeg' '--with-gettext' '--with-kerberos' '--with-libdir=lib64' '--with-libxml' '--with-mysqli' '--with-openssl' '--with-pdo-mysql' '--with-pdo-sqlite' '--with-pear' '--enable-sockets' '--with-mhash' '--with-ldap-sasl' '--with-xsl' '--with-zlib' '--with-zip' '-with-bz2' '--with-iconv' '--enable-fpm' '--enable-pdo' '--enable-bcmath' '--enable-mbregex' '--enable-mbstring' '--enable-opcache' '--enable-pcntl' '--enable-shmop' '--enable-soap' '--enable-ftp' '--with-xpm' '--enable-xml' '--enable-sysvsem' '--enable-cli' '--enable-intl' '--enable-calendar' '--enable-static' '--enable-ctype' '--enable-mysqlnd' '--enable-session'

四,查看安装目录下的build-defs.h文件

[liuhongdi@img ~]$ more /usr/local/soft/php8.2.5/include/php/main/build-defs.h
/*
   +----------------------------------------------------------------------+
   | Copyright (c) The PHP Group                                          |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
   | available through the world-wide-web at the following url:           |
   | https://www.php.net/license/3_01.txt                                 |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | [email protected] so we can mail you a copy immediately.               |
   +----------------------------------------------------------------------+
   | Author: Stig Sæther Bakken <[email protected]>                             |
   +----------------------------------------------------------------------+
*/

#define CONFIGURE_COMMAND " './configure'  '--prefix=/usr/local/soft/php8.2.5' '--with-config-file-path=/usr/local/soft/php8.2.5/etc' '--with-curl' '--with-freetype' '--enable-gd
' '--with-jpeg' '--with-gettext' '--with-kerberos' '--with-libdir=lib64' '--with-libxml' '--with-mysqli' '--with-openssl' '--with-pdo-mysql' '--with-pdo-sqlite' '--with-pear' '--
enable-sockets' '--with-mhash' '--with-ldap-sasl' '--with-xsl' '--with-zlib' '--with-zip' '-with-bz2' '--with-iconv' '--enable-fpm' '--enable-pdo' '--enable-bcmath' '--enable-mbr
egex' '--enable-mbstring' '--enable-opcache' '--enable-pcntl' '--enable-shmop' '--enable-soap' '--enable-ftp' '--with-xpm' '--enable-xml' '--enable-sysvsem' '--enable-cli' '--ena
ble-intl' '--enable-calendar' '--enable-static' '--enable-ctype' '--enable-mysqlnd' '--enable-session'"
#define PHP_ODBC_CFLAGS ""
#define PHP_ODBC_LFLAGS         ""
#define PHP_ODBC_LIBS           ""
...

说明:刘宏缔的架构森林—专注it技术的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/09/02/php-zha-kan-an-zhuang-shi-de-bian-yi-can-shu-php-8-2-5/
代码: https://github.com/liuhongdi/ 或 https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]

五,查看php版本

[liuhongdi@img ~]$ /usr/local/soft/php8.2.5/bin/php -v
PHP 8.2.5 (cli) (built: May 10 2023 14:51:39) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies

标签:8.2,--,soft,php8.2,编译,enable,php,local
From: https://www.cnblogs.com/architectforest/p/17674260.html

相关文章

  • php:命令行的常用例子(php 8.2.5)
    一,查看安装配置信息[liuhongdi@img~]$/usr/local/soft/php8.2.5/bin/php-i           相当于执行:[liuhongdi@img~]$/usr/local/soft/php8.2.5/bin/php-r"phpinfo();”二,列出开启的扩展模块:[liuhongdi@img~]$/usr/local/soft/php8.2.5/bin/php-m[......
  • 记录centos stream 9 编译qt5.15.10源码
    开始装的一些依赖库没有记录gcc之类的,都是通过dnf安装的主要是make过程中出现的问题(qtwebengine)及其如何解决编译的命令如下./configure-prefix/home/kun/usr/Qt/5.15.10-opensource-confirm-licensemake-j16makeinstallconfigure阶段失败一般都是缺少,都是dnf解决的......
  • 文心一言 VS 讯飞星火 VS chatgpt (85)-- 算法导论8.2 2题
    二、用go语言,试证明COUNTING-SORT是稳定的。文心一言:要证明COUNTING-SORT是稳定的,我们需要证明在排序过程中,具有相同值的元素在排序后仍保持其原始的相对顺序。COUNTING-SORT是一种基于计数的排序算法,其核心思想是利用计数数组记录待排序元素的数量。下面是COUNTING-SORT的......
  • Qt编译报错:multiple definition of
    解决方法一:在.pro文件下查看SOURCES+=和HEADERS+=也没有重复引入文件,删除重复的文件即可。解决方法二:把debug文件夹下的.o文件都删除,然后再编译下。解决方法三:如果.h文件中有类的定义和实现,则实现时在每个成员前加inline。  转载于:QT项目出现multipledefinitionof错误......
  • 文心一言 VS 讯飞星火 VS chatgpt (85)-- 算法导论8.2 2题
    二、用go语言,试证明COUNTING-SORT是稳定的。文心一言:要证明COUNTING-SORT是稳定的,我们需要证明在排序过程中,具有相同值的元素在排序后仍保持其原始的相对顺序。COUNTING-SORT是一种基于计数的排序算法,其核心思想是利用计数数组记录待排序元素的数量。下面是COUNTING-SORT......
  • c++编译
    1.1c++编译c++脚本程序写完之后,并不能直接运行,需要进行编译,转成.o文件,再链接才能运行,一般包括:预处理,汇编,编译。链接四步,如下:预编译把.c源文件编译成.ii预处理文件gcc-E[源文件.c]-o[自定义名.ii]编译成汇编语言把.i文件编译成.s汇编语言文件gcc-S[......
  • aarch64/arm_v8 环境下编译Arcade-Learning-Environment —— ale-py
       condainstallg++=12   cmake../-DCMAKE_BUILD_TYPE=Release-DPYTHON_INCLUDE_DIR=/home/share/xxx/home/software/anaconda3/include-DPYTHON_LIBRARY=/home/share/xxx/home/software/anaconda3/lib/libpython3.11.so-DPython3_EXECUTABLE=/home/share/x......
  • GCC实现多文件编译,静态库,动态库
    GCC实现多文件编译,静态库,动态库一代码 //add.hintadd(inta,intb);  //add.cintadd(inta,intb){  returna+b;}  //main.c #include<stdio.h>#include"add.h" voidmain(){   printf("3+2=%d\n",add(3+2));} 二......
  • 如何在CMAKE中指定python路径——使用cmake为python编译扩展模块时指定python路径
     答案:cmake-DPython3_EXECUTABLE=/path/to/bin/python3   =================================================    参考:https://stackoverflow.com/questions/49908989/cmake-cant-find-python3   =================================== ......
  • php操作数据库
    w3c地址:https://www.w3cschool.cn/php/php-mysql-connect.html1.连接数据库<?php$servername="localhost";$username="username";//数据库用户名$password="password";//数据库密码//创建连接$conn=newmysqli($servername,$us......