title: php 7 --with-config-file-scan-dir not working
body: <p>OS: Debian 8.6 amd64, PHP 7.0.13 source(tar.gz) download from php.net, checked the md5 and sha256. </p>
  
  <p>Try <code>--with-config-file-scan-dir</code> set to <code>/etc/php7/cli/conf.d</code> or <code>/etc/php7/cli/conf.d/</code> still not working.</p>
  
  <pre class="lang-sh prettyprint-override"><code>root@debian:/usr/src/php-7.0.13#./configure \
  --prefix=/usr/local/php7 \
  --with-config-file-path=/etc/php7/cli \
  --with-config-file-scan-dir=/etc/php7/cli/conf.d/ \
  --disable-all \
  --enable-json=shared
  
  root@debian:/usr/src/php-7.0.13# /usr/local/php7/bin/php --ini
  Configuration File (php.ini) Path: /etc/php7/cli
  Loaded Configuration File:         /etc/php7/cli/php.ini
  Scan for additional .ini files in: (none)
  Additional .ini files parsed:      (none)
  </code></pre>
  
  <p>In <code>/usr/src/php-7.0.13/main/build-defs.h</code> file last but one line, the <code>PHP_CONFIG_FILE_SCAN_DIR</code> constant was defined, but still not working.</p>
  
  <pre class="lang-c prettyprint-override"><code>#define PHP_CONFIG_FILE_SCAN_DIR    "/etc/php7/cli/conf.d/"
  </code></pre>
  
  <p>If export the <code>PHP_INI_SCAN_DIR</code> environment variable, it's working.</p>
  
  <pre class="lang-sh prettyprint-override"><code>root@debian:/usr/src/php-7.0.13# export PHP_INI_SCAN_DIR=/etc/php7/cli/conf.d/
  root@debian:/usr/src/php-7.0.13# /usr/local/php7/bin/php --ini
  Configuration File (php.ini) Path: /etc/php7/cli
  Loaded Configuration File:         /etc/php7/cli/php.ini
  Scan for additional .ini files in: /etc/php7/cli/conf.d/
  Additional .ini files parsed:      /etc/php7/cli/conf.d/json.ini
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>When 1st building, I forget setting <code>--with-config-file-path</code> and <code>--with-config-file-scan-dir</code>, so I used <code>export PHP_INI_SCAN_DIR=/etc/php7/cli/conf.d/</code> and it's working.</p>
  
  <p>So I remove it and building again, But I used <code>export PHP_INI_SCAN_DIR=</code> NOT <code>unset</code>. So in the 2nd building, the <code>PHP_INI_SCAN_DIR</code> env variable is still working and it's empty.</p>
  
  <p>The correct way</p>
  
  <pre class="lang-sh prettyprint-override"><code>unset PHP_INI_SCAN_DIR
  </code></pre>