Results 1 to 3 of 3

Thread: DOCUMENT_ROOT on Windows/IIS server ?

  1. #1
    Join Date
    Aug 2006
    Posts
    44
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question DOCUMENT_ROOT on Windows/IIS server ?

    Hi,

    I try to install "Download 2.0" PHP Script from Simon Stenhouse
    http://www.simonstenhouse.net/index.php?area=projects
    But I meet some difficulties!

    I think my problem is "DOCUMENT_ROOT", it's not a good value on Windows/IIS server.
    I have to set some informations in this script (see below), I've tried many different values but I'm not able to run this script

    Could you help me

    Chris

    // Root path of your site
    $root = $_SERVER['DOCUMENT_ROOT'] . '/';

    // Path to downloadable files (will not be revealed to users so they will never know your files real address)
    $hidden = 'hidden/';

    // Path to data files
    // NOTE: This directory must have been CHMOD'd to 777
    $data = 'data/';

    // Path to and name of your leech warning page
    $leech = 'leech.php';

    // Path to and name of your hack warning page
    $hack = 'hack.php';

    // Allow null referer's to download files (true/false). If true, and the referer value is null, the user will still be allowed to download. If false, it will be regarded as a leech attempt. Default is false.
    $allow_null_referer = false;

    // Limits the download speed (in KB's per second). Default is 24 KB's per second.
    $speed = 24;

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    If you run a phpinfo(), what value is given for DOCUMENT_ROOT? If it doesn't display anything (which is odd), you will have to "hard-code" this line to point to your web_root.

    Code:
    $root = $_SERVER['DOCUMENT_ROOT'] . '/';
    Change to something like so:

    Code:
    $root = 'C:/Inetpub/sites/mysite.com/'; //whatever you webroot is
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Aug 2006
    Posts
    44
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Excellent it's done... thanks a lot for your help!

Bookmarks

Posting Permissions

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