ShadowMage Posted September 25, 2012 Share Posted September 25, 2012 Having some issues with require paths and I just want some clarification. I know how I think this should work, but it doesn't make any sense. How would the following path resolve:/usr/local/www/htdocs/majorsky/htdocs/../lib The path is invoked from:/usr/local/www/htdocs/majorsky/htdocs/webspace Link to comment Share on other sites More sharing options...
Ingolme Posted September 25, 2012 Share Posted September 25, 2012 From "htdocs" move up one directory, then access "lib" therefore the full path is /usr/local/www/htdocs/majorsky/lib/ Link to comment Share on other sites More sharing options...
ShadowMage Posted September 26, 2012 Author Share Posted September 26, 2012 Ok, that's what I thought. The reason I'm asking is because the web host for our company website is migrating to a new server and they made some directory structure changes that broke the website. So I'm trying to figure out what the heck is going on and how to fix it (I didn't write the website so it's...difficult...to say the least). Anyway, with your confirmation, I just had an epiphany. I had thought that the above didn't make sense, because it didn't match up with the directory structure on the old server, but then I realized that the file path I posted was taken from the error message that was thrown out on the new server. So of course it wouldn't match the structure on the old one! Once I got the file structures straightened out and using the right one on the right server, everything started making sense. ^_^Thanks for the confirmation and the nudge in the right direction, Ingolme! Link to comment Share on other sites More sharing options...
boen_robot Posted September 26, 2012 Share Posted September 26, 2012 For future reference's sake - if a path starts with "/", under UNIX, it will always be relative to the root, regardless of your CWD.That being said, some applications might treat "the root" as something other than the OS' root, but if that's so, they'll explicitly clarify it. PHP doesn't do that though... Apache sort of does it (paths without quotes that start with "/" are relative to the "ServerRoot"). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now