document root, dosent work as expacted

Discussion in 'Installation/Configuration' started by fishown, May 16, 2011.

  1. fishown

    fishown New Member

    Hello everyone,
    I know this issue is minor, but I want to fix all the little bugs.
    In php, whene i type "/some/thing.XXX"
    It wont reach the file, only if ill add "." like this "./some/thing.XXX"
    The document root function point to the web folder as it sould,
    but the "/" not.

    and ideas?
  2. falko

    falko Super Moderator ISPConfig Developer

    To what tutorial are you referring?

    Do you use ISPConfig?
  3. fishown

    fishown New Member

    soory that I dident mentioned ....

    Perfect server centOS 5.6
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you include a file in php with require() or include(), the website docroot is not relevant for php. So if you include a file from a local path, the path is either ./some/thing.XXX or some/thing.XXX. Paths thats tart with / have to be full paths, e.g. /var/www/
  5. fishown

    fishown New Member

    but if I remmber currectly I used "/" as the root folder...
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the DocumentRoot setting from your virtual host? I doubt that it is "/".

    Please try what Till suggested and leave out the "/" in the beginning of your PHP paths.
  7. fishown

    fishown New Member

    hi ther,
    recently I moved my website to a newer server, so i get alot of not working code,
    sinse all the codes user / infront of the pathes,
    so i would like to know how to make the / as the document root please.
    thank you

Share This Page