no document_root?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • olafmol

    no document_root?

    Hello,

    on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
    "DOCUMENT_R OOT" environment var. Is there any reason i dont get this? Can i
    do something about it? I need this because i run a template with an include
    inside an eval-block that is requested from 2 different locations.

    Thanks, Olaf



  • Five Cats

    #2
    Re: no document_root?

    In article <3fc71783$0$417 48$5fc3050@drea der2.news.tisca li.nl>, olafmol
    <olaf@expansion s.nl> writes[color=blue]
    >Hello,
    >
    >on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
    >"DOCUMENT_ROOT " environment var. Is there any reason i dont get this? Can i
    >do something about it? I need this because i run a template with an include
    >inside an eval-block that is requested from 2 different locations.
    >[/color]

    Try using $_SERVER["DOCUMENT_R OOT"]

    Running phpinfo.php might be of use to you.

    --
    Surfer!
    If you really want to send me email then use:
    five_cats at uk2 dot net

    Comment

    • Jon Kraft

      #3
      Re: no document_root?

      "olafmol" <olaf@expansion s.nl> wrote:
      [color=blue]
      > on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have
      > any "DOCUMENT_R OOT" environment var. Is there any reason i dont get
      > this? Can i do something about it? I need this because i run a
      > template with an include inside an eval-block that is requested from 2
      > different locations.[/color]

      Hi Olaf,

      Try $_SERVER['DOCUMENT_ROOT']



      HTH;
      JOn

      Comment

      • olafmol

        #4
        Re: no document_root?

        the document_root var isn't defined at all..... it doesnt' show up in the
        phpinfo list....

        any suggestions? is this normal on a windows NT4 IIS4 CGI installation?

        Olaf

        Five Cats <cats_five@127. 0.0.1> wrote in message
        news:hGnERNWuPy x$EwJQ@nevis-view.demon.co.u k...[color=blue]
        > In article <3fc71783$0$417 48$5fc3050@drea der2.news.tisca li.nl>, olafmol
        > <olaf@expansion s.nl> writes[color=green]
        > >Hello,
        > >
        > >on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
        > >"DOCUMENT_ROOT " environment var. Is there any reason i dont get this? Can[/color][/color]
        i[color=blue][color=green]
        > >do something about it? I need this because i run a template with an[/color][/color]
        include[color=blue][color=green]
        > >inside an eval-block that is requested from 2 different locations.
        > >[/color]
        >
        > Try using $_SERVER["DOCUMENT_R OOT"]
        >
        > Running phpinfo.php might be of use to you.
        >
        > --
        > Surfer!
        > If you really want to send me email then use:
        > five_cats at uk2 dot net
        >[/color]


        Comment

        • Savut

          #5
          Re: no document_root?

          Use Apache for windows instead

          Savut

          "olafmol" <olaf@expansion s.nl> wrote in message
          news:3fc71783$0 $41748$5fc3050@ dreader2.news.t iscali.nl...[color=blue]
          > Hello,
          >
          > on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
          > "DOCUMENT_R OOT" environment var. Is there any reason i dont get this? Can[/color]
          i[color=blue]
          > do something about it? I need this because i run a template with an[/color]
          include[color=blue]
          > inside an eval-block that is requested from 2 different locations.
          >
          > Thanks, Olaf
          >
          >
          >[/color]


          Comment

          • Justin Koivisto

            #6
            Re: no document_root?

            olafmol wrote:
            [color=blue]
            > Hello,
            >
            > on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
            > "DOCUMENT_R OOT" environment var. Is there any reason i dont get this? Can i
            > do something about it? I need this because i run a template with an include
            > inside an eval-block that is requested from 2 different locations.
            >
            > Thanks, Olaf
            >
            >
            >[/color]

            DOCUMENT_ROOT I believe is specific to Apache, or at least IIS doesn't
            set it. Because of this, when working with IIS, I work off the system
            path via:
            $DOCUMENT_ROOT= dirname(__FILE_ _);
            which is in a file that I place in the document root. I then have that
            file included by all other scripts (sometimes with auto_prepend).

            --
            Justin Koivisto - spam@koivi.com
            PHP POSTERS: Please use comp.lang.php for PHP related questions,
            alt.php* groups are not recommended.

            Comment

            • Justin Koivisto

              #7
              Re: no document_root?

              Justin Koivisto wrote:
              [color=blue]
              > olafmol wrote:
              >[color=green]
              >> Hello,
              >>
              >> on my windows NT4 server with IIS4 and PHP Version 4.3.1 i don't have any
              >> "DOCUMENT_R OOT" environment var. Is there any reason i dont get this?
              >> Can i
              >> do something about it? I need this because i run a template with an
              >> include
              >> inside an eval-block that is requested from 2 different locations.
              >>
              >> Thanks, Olaf[/color]
              >
              > DOCUMENT_ROOT I believe is specific to Apache, or at least IIS doesn't
              > set it. Because of this, when working with IIS, I work off the system
              > path via:
              > $DOCUMENT_ROOT= dirname(__FILE_ _);
              > which is in a file that I place in the document root. I then have that
              > file included by all other scripts (sometimes with auto_prepend).
              >[/color]

              Sorry, I should have provided this as well (from my bookmarks):



              --
              Justin Koivisto - spam@koivi.com
              PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.

              Comment

              Working...