Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4062300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:34:52+00:00 2026-05-20T15:34:52+00:00

We’ve all seen this error before: Warning: require_once(test/blah.inc) [function.require-once]: failed to open stream: No

  • 0

We’ve all seen this error before:

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

Super annoying.

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.

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.

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.

Thoughts? Does someone have a snippet kicking around they could share?

Thanks a million in advance! 🙂

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! 🙂

Edit 2: Thanks for all who have answered. Getting the include path is nice, but I’m looking for actual absolute 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:34:53+00:00Added an answer on May 20, 2026 at 3:34 pm

    Quoting the manual’s page of include :

    Files are included based on the file
    path given or, if none is given, the
    include_path specified.
    If the file
    isn’t found in the include_path,
    include() will finally check in the
    calling script’s own directory and the
    current working directory before
    failing

    And the [**`include_path`**][2] is a configuration directive that *(quoting)* :

    Specifies a list of directories where
    the require(), include(), fopen(),
    file(), readfile() and
    file_get_contents() functions look for
    files.

    It can be configured in your php.ini file, or at runtime, using the set_include_path() function.

    And, of course, to get the include path, you have get_include_path().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In order to apply a triggered animation to all ToolTip s in my app,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have just tried to save a simple *.rtf file with some websites and
I want use html5's new tag to play a wav file (currently only supported
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.