Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-20 Thread sasha
On Wed, 18 Dec 2002 15:47:44 -0600, Joseph W. Goff 
<[EMAIL PROTECTED]> wrote:

Is there a difference between PHP versions on your machine and your site?
Have you looked at phpinfo() to see what variables have been set on your
system?

- Original Message -
From: "rolf vreijdenberger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 3:38 PM
Subject: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost




hey there,

I include files outside the document root in my site.
include $_SERVER['DOCUMENT_ROOT']."../inc.php" ;

when I use this on the localhost it doesn't find this variable:
$_SERVER['DOCUMENT_ROOT']

which makes testing more annoying since I have to upload to my site all

the

time.

any ideas on the how and why???
thanks a lot



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






I run a fairly recent PHP version (4.2+) on my personal machine (IIS on 
Win2k pro), and it doesn't return a fair number of $_SERVER variables.  I 
just figured it was an IIS issue and worked around it.

--
sasha

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread DL Neil
Rolf,

> > the document_root just doesn't show up in my phpinfo();
> >
> > do windows machines have one anyway?
> > I have used this var before, just not testing it locally.
> >
> > It normally shows up when I use phpifno on the server.


Please check/compare the entries for doc_root = in the two PHP.INI files.
Are they the same/given a value. NB:

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
;doc_root =;;

Regards,
=dn


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
IIS may not have that variable.
You might want to install apache on your local machine so that you are using
the same tools.

- Original Message -
From: "rolf vreijdenberger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 4:00 PM
Subject: Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost


>
> the document_root just doesn't show up in my phpinfo();
>
> do windows machines have one anyway?
> I have used this var before, just not testing it locally.
>
> It normally shows up when I use phpifno on the server.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger

the document_root just doesn't show up in my phpinfo();

do windows machines have one anyway?
I have used this var before, just not testing it locally.

It normally shows up when I use phpifno on the server.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
I use php 4.2.3

and only my pc is running xp, the server is a linux machine



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
Both sites are running winXP and IIS?  Both same version of IIS?
If the variable is on one and not on the other it could be either a version
conflict, or a configuration problem.
- Original Message -
From: "Rolf Vreijdenberger" <[EMAIL PROTECTED]>
To: "Joseph W. Goff" <[EMAIL PROTECTED]>; "php-general"
<[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 3:50 PM
Subject: Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost


> yes, the server var doesn't exist in phpifno();
>
> no difference
> winxp pro with iss
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Leif K-Brooks
No, PHP version.  With virtually no information, I'm going to guess that 
you're using a version below 4.1, which is where the $_* variables were 
introduced.  Upgrade or use $HTTP_SERVER_VARS.

Rolf Vreijdenberger wrote:

yes, the server var doesn't exist in phpifno();

no difference
winxp pro with iss

 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Rolf Vreijdenberger
yes, the server var doesn't exist in phpifno();

no difference
winxp pro with iss

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
Is there a difference between PHP versions on your machine and your site?
Have you looked at phpinfo() to see what variables have been set on your
system?

- Original Message -
From: "rolf vreijdenberger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 3:38 PM
Subject: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost


>
> hey there,
>
> I include files outside the document root in my site.
> include $_SERVER['DOCUMENT_ROOT']."../inc.php" ;
>
> when I use this on the localhost it doesn't find this variable:
> $_SERVER['DOCUMENT_ROOT']
>
> which makes testing more annoying since I have to upload to my site all
the
> time.
>
> any ideas on the how and why???
> thanks a lot
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger

hey there,

I include files outside the document root in my site.
include $_SERVER['DOCUMENT_ROOT']."../inc.php" ;

when I use this on the localhost it doesn't find this variable:
$_SERVER['DOCUMENT_ROOT']

which makes testing more annoying since I have to upload to my site all the
time.

any ideas on the how and why???
thanks a lot



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php