PHP after installation php-config command what to do

Source: Internet
Author: User
Tags sapi zts zend

Php-config is a simple command-line script to view information about the installed PHP configuration.

We execute php-config at the command line to output all configuration information

Usage:/usr/Local/php/bin/php-Config [option]options:--prefix [/usr/Local/PHP]--includes [-i/usr/Local/php/include/php-i/usr/Local/php/include/php/main-i/usr/Local/php/include/php/tsrm-i/usr/Local/php/include/php/zend-i/usr/Local/php/include/php/ext-i/usr/Local/php/include/php/ext/date/Lib]--ldflags [-l/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10. One. sdk/usr/lib-l/usr/Local/lib-l/usr/Local/mysql/Lib]--libs [-lz-lresolv-lmysqlclient-lmcrypt-lpng-lz-lcurl-lm-lxml2-lz-licucore-lm-lcurl-lxml2-l Z-licucore-lm-lmysqlclient-lxml2-lz-licucore-lm-lxml2-lz-licucore-lm-lxml2-lz-licucore-lm-lxml2-lz-licuc Ore-LM]--extension-dir [/usr/Local/php/lib/php/extensions/No-debug-non-zts-20131226]  --include-dir [/usr/Local/php/include/PHP]--man-dir [/usr/Local/php/php/Man ]--php-binary [/usr/Local/php/bin/PHP]--php-Sapis [CLI fpm CGI]--configure-options [--prefix=/usr/Local/php--with-config-file-path=/usr/Local/php/etc--with-mysql=/usr/Local/mysql--with-mysqli=/usr/Local/mysql/bin/mysql_config--with-curl--enable-fpm--with-mcrypt--with-mhash--with-gd-enable-zip--enable-fastCGI-- without-Iconv]--version [5.6. +]  --vernum [50621]

Actually, Php-config's just a script.

Let's find out where Php-config is, then open the file and study it.

where php-configlocalhost% where php-config/usr/local/php/bin/php-config/usr/bin/php- configlocalhost% vim/usr/local/php/bin/php-config

The script content is as follows

#! /bin/SHSED="/usr/bin/sed"prefix="/ usr"Datarootdir="/usr/php"Exec_prefix="${prefix}"version="5.5.30"Vernum="50530"Include_dir="${prefix}/include/php"includes="-i$include_dir-i$include_dir/main-i$include_dir/tsrm-i$include_dir/zend-i$include_dir/ext-i$include_dir/ Ext/date/lib"Ldflags="-l/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/ Macosx10.11.internal.sdk/usr/lib"Libs="-lresolv-lcrypto-lssl-lcrypto-lz-lexslt-ltidy-lresolv-ledit-lncurses-lldap-llber-liconv-liconv-lpng-lz -ljpeg-lcrypto-lssl-lcrypto-lcurl-lbz2-lz-lpcre-lcrypto-lssl-lcrypto-lm-lxml2-lz-licucore-lm-lgssapi_krb 5-lkrb5-lk5crypto-lcom_err-lcurl-lxml2-lz-licucore-lm-lxml2-lz-licucore-lm-lnetsnmp-lcrypto-lxml2-lz-licu Core-lm-lxml2-lz-licucore-lm-lxml2-lz-licucore-lm-lxml2-lz-licucore-lm-lxml2-lz-licucore-lm-lxml2-lz-l Icucore-lm-lxml2-lxslt"Extension_dir='/usr/lib/php/extensions/no-debug-non-zts-20121212'Man_dir= ' EvalEcho/usr/share/Mans' Program_prefix=""Program_suffix=""exe_extension=""php_cli_binary=nonephp_cgi_binary=noneconfigure_options="'--prefix=/usr '--mandir=/usr/share/man '--infodir=/usr/share/info '--disable-dependency-tracking '-- Sysconfdir=/private/etc '--with-libdir=lib '--enable-cli '--with-iconv=/applications/xcode.app/contents/ Developer/platforms/macosx.platform/developer/sdks/macosx10.11.internal.sdk/usr '--with-config-file-path=/etc ' '--with-config-file-scan-dir=/library/server/web/config/php '--with-libxml-dir=/applications/xcode.app/ Contents/developer/platforms/macosx.platform/developer/sdks/macosx10.11.internal.sdk/usr '--with-openssl=/ applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.11.internal.sdk/ Usr/local"Php_sapis="Apache2handler CLI fpm"# Set Php_cli_binary and Php_cgi_binaryifavailable forSapiinch$php _sapis; Do   Case$sapiinchCLI) php_cli_binary="${exec_prefix}/bin/${program_prefix}php${program_suffix}${exe_extension}"    ;; CGI) Php_cgi_binary="${exec_prefix}/bin/${program_prefix}php-cgi${program_suffix}${exe_extension}"    ;; Esac Done# determinewhich(ifAny ) PHP binary is availableifTest"$php _cli_binary"!="NONE"; Thenphp_binary="$php _cli_binary"Elsephp_binary="$php _cgi_binary"fi# Remove Quotesconfigure_options=`Echo$configure _options | $SED-E"s# ' # #g"` Case " $" inch--prefix)Echo$prefix;;--includes)Echo$includes;;--ldflags)Echo$ldflags;;--Libs)Echo$libs;;--extension-dir)  Echo$extension _dir;;--include-dir)  Echo$include _dir;;--php-binary)Echo$php _binary;;--php-Sapis)Echo$php _sapis;;--configure-options)Echo$configure _options;;--Mans-dir)  Echo$man _dir;;--version)Echo$version;;--vernum)Echo$vernum;;*)  Cat<<eofusage: $0[option]options:--prefix [$prefix]--includes [$includes]--ldflags [$ldflags]--Libs [$libs]--extension-dir[$extension _dir]--include-dir[$include _dir]--Mans-dir[$man _dir]--php-binary [$php _binary]--php-Sapis [$php _sapis]--configure-options [$configure _options]--version [$version]--Vernum [$vernum]eof exit1;;EsacExit0

PHP after installation php-config command what to do

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.