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

  • Home
  • SEARCH
  • 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 978751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:06:26+00:00 2026-05-16T04:06:26+00:00

I just got a strange problem. I am including some files from my index.php,

  • 0

I just got a strange problem. I am including some files from my index.php, and now I got this error:

 require(cfg/cfg.database.inc.php) [function.require]: failed to open stream: No such file or directory in C:\...\index.php on line XX

Strange is that it worked just a minute ago. I double checked the spelling of that filename.

What I did: I am using Notepad++ and I saw my code like this:

require("cfg/cfg.database.inc.php" );

I wanted to remove the space between " and ), so i moved the cursor there and pushed Del, but it deleted the last p of .php.

I deleted the whole line and rewrote it, and now I get the error that the file cannot be found. I also renamed the file which is not working. All files in the subdir cfg get this error, but not those in other subdirs.

Anyone knows what I am doing wrong or what I can do to find the problem?
Thanks.

/edit: My file structure

index.php
cfg/cfg.database.inc.php
cfg/cfg.other.inc.php
core/class.user.inc.php
core/...

All includes in core work, none of those from cfg

  • 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-16T04:06:27+00:00Added an answer on May 16, 2026 at 4:06 am

    There’s usualy two reasons for this kind of behavior

    1. Your PHP file and/or your file name has a character that’s rendering to the screen as a standard, ascii letter, but is in fact some other letter in another encoding

    2. You have multiple cfg folders, and PHP is looking in the wrong one.

    Give this s try to see which cfg folder (relative to your running script) PHP sees, and what files it sees in there.

    $my_cfg_files = glob('./*');
    

    Next, try requiring files by iterating the loop

    header('Content-Type: text/plain');
    foreach($my_cfg_files as $file)
    {
        echo 'trying ' . $file . "\n";
        require_once($file);
    }
    exit("\n Done \n");
    

    Take a look at the list of files that it outputs. Copy what the scripts prints and include it in your require statement.

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

Sidebar

Related Questions

I've just had a strange problem show up with my XCode project. The project
I've got this strange bug in my app. I'm making a subview and drawing
I've got a strange bug, well, MSIE does. Seems it is failing on all
I've just migrated a solution containing c++ and c# projects from VS2008 to VS2010
I am having a strange problem in my code. I have many asserts scattered
I've got a strange issue with a simple select dropdown not displaying in IE8.
I have got all my OpenGL lighting working properly, with the normals, materials, ect...
I'm working with Android, trying to make my AudioTrack application play a Windows .wav
I'm writing a firmware for a Atmel XMEGA microcontroller in c and I think
I am using Entity Framework with the Self-Tracking Entity T4 templates, which by default

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.