|
Posted by Rik on 07/29/07 13:14
On Sun, 29 Jul 2007 12:46:50 +0200, John <67vnue6o@knwfv> wrote:
> I am setting up one of my PC's as a server. So far I have loaded
> Apache2.2.4 which works fine across my internal network using the IP
> address of the server. I have also loaded PHP5.2.3 and Mysql5. Simple
> PHP also works on webpages across my new intranet.
>
> However I have a number of sites I would like to run that have been
> developed and work fine over the internet at my ISP. The first page is
> getting stuck at the first line when loading-
>
> require_once ($_SERVER['DOCUMENT_ROOT'] . "/site_data.inc");
Have you checked what's actually in $_SERVER['DOCUMENT_ROOT'], and it is
what you expect?
> Now I remember having a problem with Register_Global's before and have
> modified the php.ini to set this ON. I know this is not recommended
> but access will not outside of the intrnet so there is no security
> issue.
Well, most destructive hacking gets done inside companies, not from the
outside...
> I rebooted but this does not seem to make any difference. Blank page
> shows with
>
> <html>
> <head>
>
> And that's where the first require_once sits.
Are errors logged? If so, check your log file. Else, temporarily enable
display_errors & error_reporting in your php.ini to check what they have
to say.
> If I comment out this line the code moves on to the next require.
> Since the site works fine I really don't want to plough through the
> code trying variants of the Server variables.
Well, why not just set up a seperate page without links, with just:
<pre>
<?php print_r($_SERVER); ?>
</pre>
So you know what it thinks is DOCUMENT_ROOT etc. It might be the simple
misconfiguration of a virtual host.
--
Rik Wasmus
[Back to original message]
|