I moved a website from the test server to the live server and now I have some problems.
The problem is that the chdir() command no longer works. I need to step down a dir but doing chdir('../') does nothing. When I var_dump() it, it return bool(false).
Safe mode is Off and im moving to the root directory so there should not be any permission problems. Any idea why this would happen?
Edit: also, the test server is on the same shared host as the live server so I don't see how there could be this strangeness since its the same server configuration.
Chdir not doing anything
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
ya getcwd() makes sence before the call but after the call to chdir() it keeps the same directory.
The thing is I am using a framework thingy that I made and all of the engine and everything are in the root directory. I put the regular index.php files in the root directory and they have access to everything no problem when I use require_once but I put the admin files in /admin and now for those files to use the requires that are built in I need to be in the root directory so I try to just do chdir('../') first thing to get to that dir which usually works perfectly fine but for some reason now I cant do it.
I put up some stupid small fix but its quite hackish and im not a fan.
The thing is I am using a framework thingy that I made and all of the engine and everything are in the root directory. I put the regular index.php files in the root directory and they have access to everything no problem when I use require_once but I put the admin files in /admin and now for those files to use the requires that are built in I need to be in the root directory so I try to just do chdir('../') first thing to get to that dir which usually works perfectly fine but for some reason now I cant do it.
I put up some stupid small fix but its quite hackish and im not a fan.