title: Xdebug on macOS 10.13 with PHP 7
body: <p>So macOS High Sierra 10.13 now comes with PHP 7.1. While configuring Apache I also created a new <code>/etc/php.ini</code> from the <code>/etc/php.ini.default</code> file, made sure to check that is was being loaded by PHP after restarting Apache, however the version of Xdebug extension that ships with macOS 10.13 doesn't seem to load or show up when you run <code>phpinfo();</code></p>
  
  <p>My php.ini is definitely being loaded:</p>
  
  <pre><code>$ php -i | grep php.ini
  Configuration File (php.ini) Path =&gt; /etc
  Loaded Configuration File =&gt; /etc/php.ini
  </code></pre>
  
  <p>Here's what my /etc/php.ini looks like where I configure Xdebug:</p>
  
  <pre><code>[xdebug]    
  zend_extension = "/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
  xdebug.remote_enable=on
  xdebug.remote_log="/var/log/xdebug.log"
  xdebug.remote_host=localhost
  xdebug.remote_handler=dbgp
  xdebug.remote_port=9000
  </code></pre>
  
  <p>[Update, fixed that typo here...]</p>
  
  <p>However, Xdebug doesn't load and checking <code>php -i</code> give no results:</p>
  
  <pre><code>$php -i | grep xdebug
  PHP Warning:  Method xdebug_start_function_monitor() cannot be a NULL 
      function in Unknown on line 0
      PHP Warning:  xdebug: Unable to register functions, unable to load in Unknown on line 0
      Segmentation fault: 11
  </code></pre>
  
  <p>And yes, the path to the file is correct:</p>
  
  <pre><code>$ ls /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
  /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so*
  </code></pre>
  
  <p>This used to work on PHP 5 so I hope someone can help me and anyone else in future struggling with this issue.</p>
  
  <p>When I check my apache log I get the following error:</p>
  
  <pre><code>Failed loading /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so:  dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so, 9): Symbol not found: _xdebug_monitored_function_dtor
    Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
    Expected in: flat namespace
   in /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
  </code></pre>
  
  <p>I'm not making progress in terms of find out how I can resolve this error:</p>
  
  <pre><code>Symbol not found: _xdebug_monitored_function_dtor
  </code></pre>