Directory & file not found after FTP upload . Files exist

(please specify the website or account you are asking about)

(please share the FULL error message you see)
failed to open stream: No such file or directory


AFter uploading my php and directories, i try to launch my webpage from the browser , but get the following error

No such file or directory

Even though the directorys are still correct and the CWD is as it should be.
Also the website runs with same code on localhost

I dont understand why there is a problem.

Uploaded sucsessfully and filesystem in tact. I dont get it.

Code might show you people something im not seeing.

thanks for any advice.

CWD is as follows (in server)


On drive it was xammp/htdocs/vbay


Directory system is


$DBConnect='DBmanagment/DBConnect.php';// Database Connection DIR
if (file_exists($DBConnect)){
    if (is_readable($DBConnect)) {
        require ($DBConnect); // INCLUDE THE DATABASE 
        else {
              throw new Throwable();
      throw new Throwable();

It looks like it has to connect to a database, and it cannot find the database. Has the database been setup correctly?

Note: I don’t know PHP, so excuse me if my anwser is wrong.

Yes database was added through Cpanel, i simply transfared the database, also i edited the code to bypass the DB as its not yet being used anyway, but still got the same error with other files / folders. funny thing is the parent directory is correct and within the parent is the necessery folders/files but for whatever reason it will not locate them… i hear i may need to ammend hy access file?

can you share the .htaccess file from your site? Also, maybe try removing the /home/vol7_1/ part of your link? It may be trying to find

/home/vol7_1/ is added by the server. it is the CWD .

i uploaded my filesd the htdocs.

Also i now can get a FTP connection thru FZ. not sure why , was fine until just now.

think i may of found 1 of the problewms with the DB. i did not change the credentials that Cpanel gave me in my PHP, so i will do this once i get past my FTP problem.

One common issues when people are uploading their website developed locally is trouble with case sensitivity.

Windows and MacOS (which runs on almost all desktops) have case insensitive file and directory names. Linux (which runs on almost all servers) has case sensitive file names.

In your account, I see the folder is called ERRORS. On Windows, it just works if you access it as Errors (or errors or eRoRrS), but on Linux these are considered different file names.

So please make sure the letter cases in your script and URLs match exactly with the names of the files.


Funny you should say this as i just tested that out seconds before i read your reply.

Thank you. However it still does not find the Files or directories even though the CWD is Vbay , The folders all all within the Parent Directory, so it should work.

ok, so tis is half the problem, the actual directory that should be loaded when i run the page is below

Instead though , my PHP for whatever reason is using a CWD of


Not sure why my php goes to that directory though.

Im not explicitly setting the CWD

but thats what is echos out as too.

echo getcwqd();

Code ammended ,run the page to see the CWD

After re-checking my PHP i find that you are indeed correct. i managed to get through to the directory after altering the Case of my filenames in my PHP.

thank you.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.