title: How to list require_once()'s searched paths in PHP?
body: <p>We've all seen this error before:</p>
  
  <pre><code>Warning: require_once(test/blah.inc) [function.require-once]: failed to open stream: No such file or directory in /home/narf/narf.inc on line 3
  
  Fatal error: require_once() [function.require]: Failed opening required 'test/blah.inc' (include_path='.:/usr/lib64/php:/usr/lib/php:/home/narf/inc:/home3/narf/php:/home3/narf/inc/dev:') in /home/narf/narf.inc on line 3
  </code></pre>
  
  <p>Super annoying.</p>
  
  <p><strong>Here's what I'm looking for:
  Some sort of PHP snippet that will list the paths that are being searched for the include file.</strong></p>
  
  <p>From what I can see, I've set up my path correctly (the above include scenario is simply a fabrication), and I can include the file successfully from other portions of the project.</p>
  
  <p>However, I just can't get it to work.  If I had a list of locations that were being searched, I could easily track down the path that I'm missing and identify why my require/include isn't working.</p>
  
  <p>Thoughts?  Does someone have a snippet kicking around they could share?</p>
  
  <p>Thanks a million in advance! :)</p>
  
  <p>Edit: For what it's worth, I think I tracked down the problem, but if you've still got something that could help out, it would be great for future misconfigurations! :)</p>
  
  <p>Edit 2: Thanks for all who have answered.  Getting the include path is nice, but I'm looking for actual <strong>absolute</strong> paths of directories that are being searched.  The reason why I'm being picky is because it gets confusing when using a require() or include() along with relative paths.  Also, I suspect that there are some other gotchas such as (potentially) whether or not symlinks are followed on a given setup, etc.</p>