Apache Issue with DOCUMENT_ROOT

Status
Not open for further replies.

harux10m

New Member
Messages
5
Reaction score
0
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/
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
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.
 

harux10m

New Member
Messages
5
Reaction score
0
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!
 

harux10m

New Member
Messages
5
Reaction score
0
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!
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
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.
 
Status
Not open for further replies.
Top