Apache Issue with DOCUMENT_ROOT

Discussion in 'Free Hosting' started by harux10m, Aug 31, 2014.

Thread Status:
Not open for further replies.
  1. harux10m

    harux10m New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi, I searched through the forums and found a topic that was related to mine. I recently just opened this account and when I tried to use \
    PHP:
    <?php include($_SERVER['DOCUMENT_ROOT'] . "/site/layout/includes/lnbInc.php"); ?>
    It keeps on sending me an error:
    [31-Aug-2014 00:09:38 America/New_York] PHP Warning: include(/usr/local/apache/htdocs/site/layout/includes/lnbInc.php): failed to open stream: No such file or directory in /home/harux10m/public_html/index.php on line 100

    It worked before, but now it doesn't seem to work. Can anyone assist me on this?

    The related topic: https://community.x10hosting.com/threads/doc-root-variable.129760/
     
  2. descalzo

    descalzo Grim Squeaker Community Support

    Messages:
    9,375
    Likes Received:
    327
    Trophy Points:
    83
    You seem to be on the new server xo4 -- the 'apache' gives it away. New set ups often have small problems.

    xo2 doesn't have that problem (not running Apache)

    So an Admin has to check out the problem on the new server.

    Until they fix it, you could edit the line to use /home/YOUR-cPanel-UserName/public_html instead.
     
    • Agree Agree x 1
  3. harux10m

    harux10m New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I checked and indeed I am on xo4. I used to have an account (months ago, until I got so busy with school and it got suspended) and I used the same coding and it worked fine, so you are right, it's probably the new server that is causing issues. Hopefully, it can be resolved. Thanks for your answer!
     
  4. leafypiggy

    leafypiggy Manager of Pens and Office Supplies Staff Member

    Messages:
    3,819
    Likes Received:
    163
    Trophy Points:
    63
    I shall resolve this shortly.
     
    • Like Like x 1
  5. harux10m

    harux10m New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thank you in advance for resolving it. I checked out the test.php file that was generated and it still has /usr/local/apache/htdocs set, but I'll continually check to see if it's fixed. But thanks again for your support!
     
  6. Bryon

    Bryon I Fix Things

    Messages:
    8,149
    Likes Received:
    101
    Trophy Points:
    48
    Hi harux10m, the issue has been fixed. We're looking into a better way of handling this, the current solution isn't too great, but it should suffice at least temporarily. If you see any problems please don't hesitate to update us here.
     
    • Like Like x 1
  7. harux10m

    harux10m New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much for the fix!
     
Thread Status:
Not open for further replies.

Share This Page