httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Pasher <just...@newmediagateway.com>
Subject Re: [users@httpd] blank pages
Date Fri, 12 Sep 2008 17:50:11 GMT
Marc Fromm wrote:
> I am setting up a new server. My pages come up blank.
>
> I checked the httpd error log and found this error:
> PHP Notice:  Undefined variable: DOCUMENT_ROOT in /var/www/html/studentjobs/index.php
on line 6, referer:
>
> Phpinfo on the old (working) server and the new server both report:
> DOCUMENT_ROOT  /var/www/html
>
> Does DOCUMENT_ROOT need to be defined someplace else?
>
> Thanks
>
> Marc
>   

This particular error is more of a PHP error than apache. What do lines 
1-6 read in your file? I'm guessing you are trying to read from a 
variable called $DOCUMENT_ROOT (which is not set). If you are trying to 
read from the server set value, you should use 
$_SERVER['DOCUMENT_ROOT']. If the file works on the other server, then 
it probably means you have register_globals set to "on", which is a very 
bad idea.

Justin Pasher

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message