11

I'm trying to customize my php install, but I'm not that familiar with compiling programs from scratch. How can I tell determine what compile-time options were used for php? Specifically, I'm trying to determine whether the --with-readline option was specified. Thanks!

  • 4
    Belongs on Stack Overflow? – user588 Mar 17 '11 at 21:41
  • 1
    Maybe, I figured they were asking whether or not the shipped version of PHP in OSX has readline support. – Jason Salaz Mar 18 '11 at 0:21
11

php -i from the command line;

$ php -i
phpinfo()
PHP Version => 5.3.3

System => Darwin jsalaz-mac.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386
Build Date => Aug 22 2010 19:27:08
Configure Command => '/var/tmp/apache_mod_php/apache_mod_php-53.3.1~2/php/configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--sysconfdir=/private/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--with-curl=/usr' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-53.3.1~2/Root/usr/local' '--with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-53.3.1~2/Root/usr/local' '--enable-gd-native-ttf' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/mysql/mysql.sock' '--with-iodbc=/usr' '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-xsl=/usr' '--enable-zend-multibyte' '--enable-zip' '--with-pcre-regex=/usr'

or;

This information should be in the phpinfo function output you can put into a webpage and visit.

PHP Info Compilation Flag Output

Per PHP's PHPInfo Reference Page, all you have to do is create a file with the contents: <?php phpinfo(); ?>, put it in a web viewable location with PHP, then browse to it in a browser.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .