www.webdeveloper.com
Results 1 to 5 of 5

Thread: How do relative paths work in php.ini?

  1. #1
    Join Date
    Jul 2007
    Posts
    4

    How do relative paths work in php.ini?

    If I put "/tmp" for my session.save_path in php.ini, does it look for a folder called tmp in the same folder as php.ini? Or will it look for a folder called tmp in the same folder as index.php when it tries to start a session? How are relative paths evaluated in a php.ini?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,251
    It will look for a directory named "tmp" at the root (top) level of the local file system. (In Linux/UNIX "/" is essentially the same thing as "C:\" in Windows.) It has nothing to do with where your web document root directory is.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jul 2007
    Posts
    4
    OK, what about with windows? If I'm on windows and I put "\ext" in my php.ini, where will it look?

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,251
    I believe it will do the same thing: If you're running your web server on the C: drive, then it will look for the "C:\ext" directory -- but since I'm not 100% sure about that, I'd probably explicitly set it to "C:\ext" if that's what I wanted to use.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Jul 2014
    Posts
    1
    Hi dillydadally,

    You can resolve on windows using .\ext
    That works for me.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles