title: Xdebug Error: "Failed loading xdebug.so: xdebug.so: cannot open shared object file: No such file or directory"
body: <p>I recently installed <code>xdebug</code> on my server but restricted it's use to our test site, which uses it's own <code>php.ini</code> file.</p>
  
  <p>For example, the test sites <code>php.ini</code> is located at:</p>
  
  <pre><code>/home/test_site/public_html/subdomain_name/php.ini
  </code></pre>
  
  <p>Inside this <code>php.ini</code> file I have the below for xdebug:</p>
  
  <pre><code>[XDebug]
  zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
  
  xdebug.profiler_append = 0
  
  xdebug.profiler_enable = 1
  
  xdebug.profiler_enable_trigger = 0
  
  xdebug.profiler_output_dir = /home/test_site/xdebug
  
  xdebug.profiler_output_name = "cachegrind.out.%s-%u.%h_%r"
  </code></pre>
  
  <p>Now, the thing is, xdebug <strong>works</strong> fine, no problems.</p>
  
  <p>However, on our main site, which also has it's own <code>php.ini</code> file, which is located for example at: </p>
  
  <pre><code>/home/main_site/public_html/php.ini
  </code></pre>
  
  <p>Inside this file I have nothing for <code>xdebug</code> in there.</p>
  
  <p>Now, I recently setup a cron in cpanel for the <code>main site</code> such as:</p>
  
  <pre><code>php -f /home/main_site/public_html/cron_jobs/main_cron.php &gt; /home/main_site/public_html/logs/main_cron.log 2&gt;&amp;1
  </code></pre>
  
  <p>Now, upon checking the output of the cron inside the log file I get the output:</p>
  
  <pre><code>Failed loading xdebug.so:  xdebug.so: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>Why am I getting this error when the main site shouldn't even be loading xdebug?</p>