1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP $_SERVER["DOCUMENT_ROOT"] on a VHOST

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by Douglas Maske, Aug 10, 2010.

  1. Douglas Maske

    Douglas Maske Guest

    0
     
    PHP $_SERVER["DOCUMENT_ROOT"] is empty when I run this:

    <?

    echo PHP $_SERVER["DOCUMENT_ROOT"]

    ?>

    but when I view phpinfo(); the variable is set correctly for the VHOST.

    How do I properly present this information to my clients scripts so that they can auto-detect web roots in their scripts?
     
  2. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    You missed in your code the ; sign after your echo line, this is why get empty page, actually is an error.
     
  3. Douglas Maske

    Douglas Maske Guest

    0
     
    It's in my code, it's just not in the example here. I'd also like to note that this worked fine on previous servers before we started using plesk.
     
Loading...