php-windows Digest 27 Feb 2001 21:13:35 -0000 Issue 465
Topics (messages 5734 through 5741):
Re: HTTP Header REFERER
5734 by: Ignatius Teo
5735 by: Gonzalo Vera
5737 by: Ernest E Vogelsinger
Re: HTTP HEADER
5736 by: Randall Barber
5738 by: Ignatius Teo
Re: Pipe problem on php4.0.4...
5739 by: Sam
PHP Configuration: engine boolean
5740 by: Nicholas_Chen.compal.com
Install Help: Win98/PWS
5741 by: Mark Petereit
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
Randall,
You're missing a proper web server...:-)
Seriously, $HTTP_REFERER and getenv("HTTP_REFERER") should work.
If not $GLOBALS["HTTP_REFERER"] should also work.
try this:
echo "HTTP_REFERER is $HTTP_REFERER, ".$GLOBALS["HTTP_REFERER"].",
".getenv("HTTP_REFERER");
and see which one gets set/returned.
Ignatius
> -----Original Message-----
> From: Randall Barber [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 27 February 2001 10:23
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] HTTP Header REFERER
>
>
> In apache, the variable:
>
> HTTP_REFERER is automatically set.
>
> I don't run apache, I tried to access the variable like this
> in a regular script:
>
> <?php
>
> echo "$http_referer";
>
> ?>
>
> Other variations include:
>
> $HTTP_REFERER
>
> $HTTP_X_REFERER
>
> $myVar = getenv("HTTP_REFERER");
>
> I don't get that variable. All the mail I found in the archives says:
>
> $HTTP_REFERER
>
> It is not working for me.
>
> Please tell me what I am missing here. I thought that all
> values of an HTTP header were passed to PHP. Does that not
> include a HTTP REQUEST header field REFERRER?
>
> I run NT4.0 IIS.
>
> Thanks in advance
> RDB
>
I think HTTP_REFERER works only for apache. To obtain values for HTTP
header vars without apache, you could use
HTTP_ENV_VARS["HTTP_REFERER"] as this is a php variable. Hope it
works right,
Gonzalo.
> In apache, the variable:
> HTTP_REFERER is automatically set.
> I don't run apache, I tried to access the variable like this in a regular script:
> <?php
> echo "$http_referer";
?>>
> Other variations include:
> $HTTP_REFERER
> $HTTP_X_REFERER
> $myVar = getenv("HTTP_REFERER");
> I don't get that variable. All the mail I found in the archives says:
> $HTTP_REFERER
> It is not working for me.
> Please tell me what I am missing here. I thought that all values of an HTTP header
>were passed to PHP. Does that not include a HTTP REQUEST header field REFERRER?
> I run NT4.0 IIS.
> Thanks in advance
> RDB
You could try to create a listing of defined globals, something like
<?php
echo "<xmp>";
while (list($key, $value) = each($GLOBALS))
echo "$key => $value\n";
echo "</xmp>";
?>
and look how your webserver defines the HTTP_REFERER variable.
Anyway, there are situations where NO referer variable is available. That's
always the case when you get to the script not using a link, but type it
into the location bar directly (or call it up from your favorites).
AFAIK, IIS on NT4 sets HTTP_REFERER correctly if available.
...ebird
>O Ernest E. Vogelsinger
(\) http://www.1-at-web.at/
^ ICQ# 13394035
This is what I get:
Warning: Undefined variable: HTTP_REFERER in c:\inetpub\wwwroot\drew.php on line 3
Warning: Undefined index: HTTP_REFERER in c:\inetpub\wwwroot\drew.php on line 3
HTTP_REFERER is , ,
It is not defined and I am seriously perturbed :). I want to use Linux so badly, but
I don't make that decision :(.
Any other ideas?
RDB
Is register_globals=On in your php.ini????
You could also try $HTTP_ENV_VARS["HTTP_REFERER"];
If not, do a <? phpinfo(); ?> and see what variables are set.
Ignatius
> -----Original Message-----
> From: Randall Barber [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 27 February 2001 10:47
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] RE: RE: HTTP HEADER
>
>
> This is what I get:
>
> Warning: Undefined variable: HTTP_REFERER in
> c:\inetpub\wwwroot\drew.php on line 3
>
> Warning: Undefined index: HTTP_REFERER in
> c:\inetpub\wwwroot\drew.php on line 3
> HTTP_REFERER is , ,
>
> It is not defined and I am seriously perturbed :). I want to
> use Linux so badly, but I don't make that decision :(.
>
> Any other ideas?
> RDB
>
Hi,
Thanks for your answer, and of course I'm sure that windows/PHP4/DLL
can't
fork threads, so I use windows/PHP4/CGI mode to run my program, as I said,
it's work under PHP4.0.3 but PHP4.0.4 or later are not. You may try it !!
> probably it is the system(), passthru(), exec() Problem. These Functions
> don't work under windows/PHP4/DLL, because the dll cannot fork threads.
> It works running PHP4 as a CGI.
>
> Olli
>
>
> ""PHP"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> 9728t9$r88$[EMAIL PROTECTED]">news:9728t9$r88$[EMAIL PROTECTED]...
> > Hi,
> >
> > I found that php4.0.4 or later version on Windows IIS
> > can't use pipe function any more, and I don't know whether
> > it is a bug because I can still use pipe function to run a
> > program under php 4.0.3pl1. Do I make any mistake in
> > configuration ??
> >
> > Sam Kuo.
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Dear All,
In PHP Manual, I found:
ini_engineengine boolean
This directive is really only useful in the Apache module version of PHP. It
is used by sites that would like to turn PHP parsing on and off on a
per-directory or per-virtual server basis. By putting engine off in the
appropriate places in the httpd.conf file, PHP can be enabled or disabled.
Where could I place "engine on" or "engine off" in httpd.conf (of Apache I
assume)? Thank you guys.
Regards,
Nicholas
I have installed PHP and PWS on my Win98 system and have followed all of the install
instructions, including manually configuring all of the registry entries. When I try
to pull up http://localhost/index.php in Internet Explorer v5.5, I see what looks like
the file download dialog pop up with a status bar and disappears almost immediately.
Then, a DOS box pops up with PHP in the title, then it immediately disappears. Nothing
is displayed in my browser.
To me, it seems like the output HTML from PHP is not being loaded as the input to
Internet Explorer.
Can someone help point me in the right direction here?
Mark Petereit
---------------------------------
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.