Directory & file not found after FTP upload . Files exist

(please specify the website or account you are asking about)
http://vbay.infinityfreeapp.com/vbay/Index.php

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

DETAILS…

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)

/home/vol7_1/epizy.com/epiz_28339183/htdocs/vbay

On drive it was xammp/htdocs/vbay

LOCALHOST/VBAY


Directory system is
htdocs{
   Vbay{
        DBmanagment
        InnerElements
        ExtraImages
        Pages
        }
}

CODE:

$DBConnect='DBmanagment/DBConnect.php';// Database Connection DIR
            
        
if (file_exists($DBConnect)){
                                
    if (is_readable($DBConnect)) {
        require ($DBConnect); // INCLUDE THE DATABASE 
        }
        else {
              throw new Throwable();
              }                                     
}
else{
      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/epizy.com/epiz_28339183/htdocs part of your link? It may be trying to find yoirsite.com/home/vol7_1/epizy.com/epiz_28339183/htdocs
Thanks

/home/vol7_1/epizy.com/epiz_28339183/htdocs 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.

3 Likes

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

http://vbay.infinityfreeapp.com/vbay/index.php

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

/home/vol7_1/epizy.com/epiz_28339183/htdocs/vbay/

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

http://vbay.infinityfreeapp.com/vbay/index.php

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.