<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>php-config</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="install.pecl.phpize.html">Compiling shared PECL extensions with phpize</a></div> <div class="next" style="text-align: right; float: right;"><a href="install.pecl.static.html">Compiling PECL extensions statically into PHP</a></div> <div class="up"><a href="install.pecl.html">Installation of PECL extensions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="install.pecl.php-config" class="sect1"> <h2 class="title">php-config</h2> <p class="para"> php-config is a simple shell script for obtaining information about the installed PHP configuration. </p> <p class="para"> When compiling extensions, if you have multiple PHP versions installed, you may specify for which installation you'd like to build by using the <em>--with-php-config</em> option during configuration, specifying the path of the respective php-config script. </p> <p class="para"> The list of command line options provided by the php-config script can be queried anytime by running php-config with the <strong class="option unknown">-h</strong> switch: <div class="example-contents screen"> <div class="cdata"><pre> Usage: /usr/local/bin/php-config [OPTION] Options: --prefix [...] --includes [...] --ldflags [...] --libs [...] --extension-dir [...] --include-dir [...] --php-binary [...] --php-sapis [...] --configure-options [...] --version [...] --vernum [...] </pre></div> </div> </p> <p class="para"> <table class="doctable table"> <caption><strong>Command line options</strong></caption> <thead> <tr> <th>Option</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>--prefix</td> <td>Directory prefix where PHP is installed, e.g. /usr/local</td> </tr> <tr> <td>--includes</td> <td>List of -I options with all include files</td> </tr> <tr> <td>--ldflags</td> <td>LD Flags which PHP was compiled with</td> </tr> <tr> <td>--libs</td> <td>Extra libraries which PHP was compiled with</td> </tr> <tr> <td>--extension-dir</td> <td>Directory where extensions are searched by default</td> </tr> <tr> <td>--include-dir</td> <td>Directory prefix where header files are installed by default</td> </tr> <tr> <td>--php-binary</td> <td>Full path to php CLI or CGI binary</td> </tr> <tr> <td>--php-sapis</td> <td>Show all SAPI modules available</td> </tr> <tr> <td>--configure-options</td> <td>Configure options to recreate configuration of current PHP installation</td> </tr> <tr> <td>--version</td> <td>PHP version</td> </tr> <tr> <td>--vernum</td> <td>PHP version as integer</td> </tr> </tbody> </table> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="install.pecl.phpize.html">Compiling shared PECL extensions with phpize</a></div> <div class="next" style="text-align: right; float: right;"><a href="install.pecl.static.html">Compiling PECL extensions statically into PHP</a></div> <div class="up"><a href="install.pecl.html">Installation of PECL extensions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>