Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6417 > unrolled thread
| Started by | brumik <brumiku@gmail.com> |
|---|---|
| First post | 2012-06-25 03:15 -0700 |
| Last post | 2012-06-25 19:42 -0400 |
| Articles | 20 on this page of 57 — 11 participants |
Back to article view | Back to comp.lang.php
Apache and php to show http request headers. brumik <brumiku@gmail.com> - 2012-06-25 03:15 -0700
Re: Apache and php to show http request headers. Luuk <luuk@invalid.lan> - 2012-06-25 12:55 +0200
Re: Apache and php to show http request headers. tony@mountifield.org (Tony Mountifield) - 2012-06-25 13:36 +0000
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 09:41 -0400
Re: Apache and php to show http request headers. tony@mountifield.org (Tony Mountifield) - 2012-06-25 14:42 +0000
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 10:44 -0400
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 18:10 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 12:48 -0400
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 19:17 +0200
Re: Apache and php to show http request headers. Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-25 10:46 -0700
Re: Apache and php to show http request headers. The Natural Philosopher <tnp@invalid.invalid> - 2012-06-25 19:00 +0100
Re: Apache and php to show http request headers. Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-25 11:22 -0700
Re: Apache and php to show http request headers. Luuk <luuk@invalid.lan> - 2012-06-25 21:09 +0200
Re: Apache and php to show http request headers. The Natural Philosopher <tnp@invalid.invalid> - 2012-06-26 00:11 +0100
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 21:36 +0200
Re: Apache and php to show http request headers. Tim Streater <timstreater@greenbee.net> - 2012-06-25 21:15 +0100
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 22:24 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 16:32 -0400
Re: Apache and php to show http request headers. Tim Streater <timstreater@greenbee.net> - 2012-06-25 23:40 +0100
xdebug, was Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-26 09:27 +0200
Re: xdebug, was Re: Apache and php to show http request headers. Tim Streater <timstreater@greenbee.net> - 2012-06-26 09:47 +0100
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 21:32 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 16:33 -0400
What can you do with PHP without a web server (Was: Apache and php to show http request headers.) "J.O. Aho" <user@example.net> - 2012-06-25 19:48 +0200
Re: What can you do with PHP without a web server (Was: Apache and php to show http request headers.) Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-25 10:59 -0700
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 15:06 -0400
Re: Apache and php to show http request headers. "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-25 14:37 -0500
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 22:03 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 16:33 -0400
Re: Apache and php to show http request headers. "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-25 15:57 -0500
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 23:32 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 18:11 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-27 04:36 +0200
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-27 10:11 +0200
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-28 13:18 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-28 08:40 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-28 16:16 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-28 11:44 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-28 18:01 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-28 15:05 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-29 11:18 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-29 08:40 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-30 12:26 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-30 08:07 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-07-03 12:20 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-03 08:44 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-07-03 16:02 +0200
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-29 14:32 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-29 08:41 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-30 12:28 +0200
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-30 08:08 -0400
Re: Apache and php to show http request headers. Arno Welzel <usenet@arnowelzel.de> - 2012-06-30 16:48 +0200
Re: Apache and php to show http request headers. Luuk <luuk@invalid.lan> - 2012-06-25 19:09 +0200
Re: Apache and php to show http request headers. The Natural Philosopher <tnp@invalid.invalid> - 2012-06-25 18:55 +0100
Re: Apache and php to show http request headers. "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-06-25 21:25 +0200
Re: Apache and php to show http request headers. The Natural Philosopher <tnp@invalid.invalid> - 2012-06-26 00:14 +0100
Re: Apache and php to show http request headers. Jerry Stuckle <jstucklex@attglobal.net> - 2012-06-25 19:42 -0400
Page 1 of 3 [1] 2 3 Next page →
| From | brumik <brumiku@gmail.com> |
|---|---|
| Date | 2012-06-25 03:15 -0700 |
| Subject | Apache and php to show http request headers. |
| Message-ID | <041d6312-2dee-4535-8215-6e9dbcb1e274@z19g2000vbe.googlegroups.com> |
I need to test various http requests from an application and am using
Apache/PHP on ubuntu to display the http request headers. The
application proxy forwards http requests to the apache server's IP
address like as follows:
192.168.40.1/test/test.html
where 192.168.40.1 is the apache server.
I have a php script to dump the headers as follows:
<?php
foreach($_SERVER as $h=>$v)
#if(ereg('HTTP_(.+)',$h,$hp))
echo "<li>$h = $v</li>\n";
header('Content-type: text/html');
?>
The problem is that to show the headers, I redirect 192.168.40.1/* to
the above index.php page using the following redirect:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/index.php$
RewriteRule $ /index.php [R=302,L]
However the php request headers page always shows the URI as /
index.php as opposed to the 'original' URI requested (/test/
test.html).
How can I get it to show the 'original' URI requested? is this
something that can be done in PHP or is it apache specific?
thanks
[toc] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2012-06-25 12:55 +0200 |
| Message-ID | <klslb9-ogk.ln1@luuk.invalid.lan> |
| In reply to | #6417 |
On 25-06-2012 12:15, brumik wrote:
>
> I need to test various http requests from an application and am using
> Apache/PHP on ubuntu to display the http request headers. The
> application proxy forwards http requests to the apache server's IP
> address like as follows:
>
> 192.168.40.1/test/test.html
>
> where 192.168.40.1 is the apache server.
>
> I have a php script to dump the headers as follows:
>
> <?php
> foreach($_SERVER as $h=>$v)
> #if(ereg('HTTP_(.+)',$h,$hp))
> echo "<li>$h = $v</li>\n";
> header('Content-type: text/html');
> ?>
>
> The problem is that to show the headers, I redirect 192.168.40.1/* to
> the above index.php page using the following redirect:
>
> Options +FollowSymlinks
> RewriteEngine on
> RewriteCond %{REQUEST_URI} !/index.php$
>
> RewriteRule $ /index.php [R=302,L]
>
> However the php request headers page always shows the URI as /
> index.php as opposed to the 'original' URI requested (/test/
> test.html).
>
> How can I get it to show the 'original' URI requested? is this
> something that can be done in PHP or is it apache specific?
>
Its apache, because it is redirecting, so PHP does only know about the
redirected request, and does have no knowledge of how this request
reached PHP.
[toc] | [prev] | [next] | [standalone]
| From | tony@mountifield.org (Tony Mountifield) |
|---|---|
| Date | 2012-06-25 13:36 +0000 |
| Message-ID | <js9phr$36a$1@softins.clara.co.uk> |
| In reply to | #6418 |
In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
> On 25-06-2012 12:15, brumik wrote:
> >
> > I need to test various http requests from an application and am using
> > Apache/PHP on ubuntu to display the http request headers. The
> > application proxy forwards http requests to the apache server's IP
> > address like as follows:
> >
> > 192.168.40.1/test/test.html
> >
> > where 192.168.40.1 is the apache server.
> >
> > I have a php script to dump the headers as follows:
> >
> > <?php
> > foreach($_SERVER as $h=>$v)
> > #if(ereg('HTTP_(.+)',$h,$hp))
> > echo "<li>$h = $v</li>\n";
> > header('Content-type: text/html');
> > ?>
> >
> > The problem is that to show the headers, I redirect 192.168.40.1/* to
> > the above index.php page using the following redirect:
> >
> > Options +FollowSymlinks
> > RewriteEngine on
> > RewriteCond %{REQUEST_URI} !/index.php$
> >
> > RewriteRule $ /index.php [R=302,L]
> >
> > However the php request headers page always shows the URI as /
> > index.php as opposed to the 'original' URI requested (/test/
> > test.html).
> >
> > How can I get it to show the 'original' URI requested? is this
> > something that can be done in PHP or is it apache specific?
> >
>
> Its apache, because it is redirecting, so PHP does only know about the
> redirected request, and does have no knowledge of how this request
> reached PHP.
You could try the Proxy flag in the RewriteRule:
RewriteRule $ http://localhost/index.php [P,L]
Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-06-25 09:41 -0400 |
| Message-ID | <js9pqt$1lm$1@dont-email.me> |
| In reply to | #6419 |
On 6/25/2012 9:36 AM, Tony Mountifield wrote:
> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
>> On 25-06-2012 12:15, brumik wrote:
>>>
>>> I need to test various http requests from an application and am using
>>> Apache/PHP on ubuntu to display the http request headers. The
>>> application proxy forwards http requests to the apache server's IP
>>> address like as follows:
>>>
>>> 192.168.40.1/test/test.html
>>>
>>> where 192.168.40.1 is the apache server.
>>>
>>> I have a php script to dump the headers as follows:
>>>
>>> <?php
>>> foreach($_SERVER as $h=>$v)
>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>> echo "<li>$h = $v</li>\n";
>>> header('Content-type: text/html');
>>> ?>
>>>
>>> The problem is that to show the headers, I redirect 192.168.40.1/* to
>>> the above index.php page using the following redirect:
>>>
>>> Options +FollowSymlinks
>>> RewriteEngine on
>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>
>>> RewriteRule $ /index.php [R=302,L]
>>>
>>> However the php request headers page always shows the URI as /
>>> index.php as opposed to the 'original' URI requested (/test/
>>> test.html).
>>>
>>> How can I get it to show the 'original' URI requested? is this
>>> something that can be done in PHP or is it apache specific?
>>>
>>
>> Its apache, because it is redirecting, so PHP does only know about the
>> redirected request, and does have no knowledge of how this request
>> reached PHP.
>
> You could try the Proxy flag in the RewriteRule:
>
> RewriteRule $ http://localhost/index.php [P,L]
>
> Cheers
> Tony
>
He can try a lot of things which won't work.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[toc] | [prev] | [next] | [standalone]
| From | tony@mountifield.org (Tony Mountifield) |
|---|---|
| Date | 2012-06-25 14:42 +0000 |
| Message-ID | <js9tc0$5vn$1@softins.clara.co.uk> |
| In reply to | #6420 |
In article <js9pqt$1lm$1@dont-email.me>,
Jerry Stuckle <jstucklex@attglobal.net> wrote:
> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
> > In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
> >> On 25-06-2012 12:15, brumik wrote:
> >>>
> >>> I need to test various http requests from an application and am using
> >>> Apache/PHP on ubuntu to display the http request headers. The
> >>> application proxy forwards http requests to the apache server's IP
> >>> address like as follows:
> >>>
> >>> 192.168.40.1/test/test.html
> >>>
> >>> where 192.168.40.1 is the apache server.
> >>>
> >>> I have a php script to dump the headers as follows:
> >>>
> >>> <?php
> >>> foreach($_SERVER as $h=>$v)
> >>> #if(ereg('HTTP_(.+)',$h,$hp))
> >>> echo "<li>$h = $v</li>\n";
> >>> header('Content-type: text/html');
> >>> ?>
> >>>
> >>> The problem is that to show the headers, I redirect 192.168.40.1/* to
> >>> the above index.php page using the following redirect:
> >>>
> >>> Options +FollowSymlinks
> >>> RewriteEngine on
> >>> RewriteCond %{REQUEST_URI} !/index.php$
> >>>
> >>> RewriteRule $ /index.php [R=302,L]
> >>>
> >>> However the php request headers page always shows the URI as /
> >>> index.php as opposed to the 'original' URI requested (/test/
> >>> test.html).
> >>>
> >>> How can I get it to show the 'original' URI requested? is this
> >>> something that can be done in PHP or is it apache specific?
> >>>
> >>
> >> Its apache, because it is redirecting, so PHP does only know about the
> >> redirected request, and does have no knowledge of how this request
> >> reached PHP.
> >
> > You could try the Proxy flag in the RewriteRule:
> >
> > RewriteRule $ http://localhost/index.php [P,L]
>
> He can try a lot of things which won't work.
Well, yes, but I didn't think my suggestion was one of them. If you
think it is, I would like to know why, so that I would know for the
future, rather than just be the target of a bit of sarcasm. You could
try something like "That won't work because...." (if applicable).
The OP's original rule obviously wouldn't work, because it tells the
client browser to generate a completely fresh request with the new
location. In contrast, the Proxy flag in RewriteRule is supposed to
make Apache proxy the original request to the new location (even to
itself if necessary). So the request's original headers should still
be present, with perhaps one or more proxy headers.
Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-06-25 10:44 -0400 |
| Message-ID | <js9tg1$pan$1@dont-email.me> |
| In reply to | #6421 |
On 6/25/2012 10:42 AM, Tony Mountifield wrote:
> In article <js9pqt$1lm$1@dont-email.me>,
> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>
>>>>> I need to test various http requests from an application and am using
>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>> application proxy forwards http requests to the apache server's IP
>>>>> address like as follows:
>>>>>
>>>>> 192.168.40.1/test/test.html
>>>>>
>>>>> where 192.168.40.1 is the apache server.
>>>>>
>>>>> I have a php script to dump the headers as follows:
>>>>>
>>>>> <?php
>>>>> foreach($_SERVER as $h=>$v)
>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>> echo "<li>$h = $v</li>\n";
>>>>> header('Content-type: text/html');
>>>>> ?>
>>>>>
>>>>> The problem is that to show the headers, I redirect 192.168.40.1/* to
>>>>> the above index.php page using the following redirect:
>>>>>
>>>>> Options +FollowSymlinks
>>>>> RewriteEngine on
>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>
>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>
>>>>> However the php request headers page always shows the URI as /
>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>> test.html).
>>>>>
>>>>> How can I get it to show the 'original' URI requested? is this
>>>>> something that can be done in PHP or is it apache specific?
>>>>>
>>>>
>>>> Its apache, because it is redirecting, so PHP does only know about the
>>>> redirected request, and does have no knowledge of how this request
>>>> reached PHP.
>>>
>>> You could try the Proxy flag in the RewriteRule:
>>>
>>> RewriteRule $ http://localhost/index.php [P,L]
>>
>> He can try a lot of things which won't work.
>
> Well, yes, but I didn't think my suggestion was one of them. If you
> think it is, I would like to know why, so that I would know for the
> future, rather than just be the target of a bit of sarcasm. You could
> try something like "That won't work because...." (if applicable).
>
> The OP's original rule obviously wouldn't work, because it tells the
> client browser to generate a completely fresh request with the new
> location. In contrast, the Proxy flag in RewriteRule is supposed to
> make Apache proxy the original request to the new location (even to
> itself if necessary). So the request's original headers should still
> be present, with perhaps one or more proxy headers.
>
> Cheers
> Tony
>
It's off topic in this newsgroup. If you want to know why, try an
appropriate newsgroup.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-06-25 18:10 +0200 |
| Message-ID | <a4rgsaFj6nU1@mid.uni-berlin.de> |
| In reply to | #6422 |
Am 25.06.2012 16:44, schrieb Jerry Stuckle:
> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>> In article <js9pqt$1lm$1@dont-email.me>,
>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>
>>>>>> I need to test various http requests from an application and am using
>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>> application proxy forwards http requests to the apache server's IP
>>>>>> address like as follows:
>>>>>>
>>>>>> 192.168.40.1/test/test.html
>>>>>>
>>>>>> where 192.168.40.1 is the apache server.
>>>>>>
>>>>>> I have a php script to dump the headers as follows:
>>>>>>
>>>>>> <?php
>>>>>> foreach($_SERVER as $h=>$v)
>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>> echo "<li>$h = $v</li>\n";
>>>>>> header('Content-type: text/html');
>>>>>> ?>
>>>>>>
>>>>>> The problem is that to show the headers, I redirect 192.168.40.1/* to
>>>>>> the above index.php page using the following redirect:
>>>>>>
>>>>>> Options +FollowSymlinks
>>>>>> RewriteEngine on
>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>
>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>
>>>>>> However the php request headers page always shows the URI as /
>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>> test.html).
>>>>>>
>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>
>>>>>
>>>>> Its apache, because it is redirecting, so PHP does only know about the
>>>>> redirected request, and does have no knowledge of how this request
>>>>> reached PHP.
>>>>
>>>> You could try the Proxy flag in the RewriteRule:
>>>>
>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>
>>> He can try a lot of things which won't work.
>>
>> Well, yes, but I didn't think my suggestion was one of them. If you
>> think it is, I would like to know why, so that I would know for the
>> future, rather than just be the target of a bit of sarcasm. You could
>> try something like "That won't work because...." (if applicable).
>>
>> The OP's original rule obviously wouldn't work, because it tells the
>> client browser to generate a completely fresh request with the new
>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>> make Apache proxy the original request to the new location (even to
>> itself if necessary). So the request's original headers should still
>> be present, with perhaps one or more proxy headers.
>>
>> Cheers
>> Tony
>>
>
> It's off topic in this newsgroup. If you want to know why, try an appropriate
> newsgroup.
>
Truth is never off topic.
/Str.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-06-25 12:48 -0400 |
| Message-ID | <jsa4pd$8ij$1@dont-email.me> |
| In reply to | #6423 |
On 6/25/2012 12:10 PM, M. Strobel wrote:
> Am 25.06.2012 16:44, schrieb Jerry Stuckle:
>> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>>> In article <js9pqt$1lm$1@dont-email.me>,
>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
>>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>>
>>>>>>> I need to test various http requests from an application and am using
>>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>>> application proxy forwards http requests to the apache server's IP
>>>>>>> address like as follows:
>>>>>>>
>>>>>>> 192.168.40.1/test/test.html
>>>>>>>
>>>>>>> where 192.168.40.1 is the apache server.
>>>>>>>
>>>>>>> I have a php script to dump the headers as follows:
>>>>>>>
>>>>>>> <?php
>>>>>>> foreach($_SERVER as $h=>$v)
>>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>>> echo "<li>$h = $v</li>\n";
>>>>>>> header('Content-type: text/html');
>>>>>>> ?>
>>>>>>>
>>>>>>> The problem is that to show the headers, I redirect 192.168.40.1/* to
>>>>>>> the above index.php page using the following redirect:
>>>>>>>
>>>>>>> Options +FollowSymlinks
>>>>>>> RewriteEngine on
>>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>>
>>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>>
>>>>>>> However the php request headers page always shows the URI as /
>>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>>> test.html).
>>>>>>>
>>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>>
>>>>>>
>>>>>> Its apache, because it is redirecting, so PHP does only know about the
>>>>>> redirected request, and does have no knowledge of how this request
>>>>>> reached PHP.
>>>>>
>>>>> You could try the Proxy flag in the RewriteRule:
>>>>>
>>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>>
>>>> He can try a lot of things which won't work.
>>>
>>> Well, yes, but I didn't think my suggestion was one of them. If you
>>> think it is, I would like to know why, so that I would know for the
>>> future, rather than just be the target of a bit of sarcasm. You could
>>> try something like "That won't work because...." (if applicable).
>>>
>>> The OP's original rule obviously wouldn't work, because it tells the
>>> client browser to generate a completely fresh request with the new
>>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>>> make Apache proxy the original request to the new location (even to
>>> itself if necessary). So the request's original headers should still
>>> be present, with perhaps one or more proxy headers.
>>>
>>> Cheers
>>> Tony
>>>
>>
>> It's off topic in this newsgroup. If you want to know why, try an appropriate
>> newsgroup.
>>
>
> Truth is never off topic.
>
> /Str.
>
Only in your small mind. This is a PHP group - hence the "PHP" in its
name. There are other groups where experts in that area hang out.
And your comment shows why there are so many crappy answers to off-topic
questions in this newsgroup.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-06-25 19:17 +0200 |
| Message-ID | <a4rkp6FhomU1@mid.uni-berlin.de> |
| In reply to | #6424 |
Am 25.06.2012 18:48, schrieb Jerry Stuckle:
> On 6/25/2012 12:10 PM, M. Strobel wrote:
>> Am 25.06.2012 16:44, schrieb Jerry Stuckle:
>>> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>>>> In article <js9pqt$1lm$1@dont-email.me>,
>>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
>>>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>>>
>>>>>>>> I need to test various http requests from an application and am using
>>>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>>>> application proxy forwards http requests to the apache server's IP
>>>>>>>> address like as follows:
>>>>>>>>
>>>>>>>> 192.168.40.1/test/test.html
>>>>>>>>
>>>>>>>> where 192.168.40.1 is the apache server.
>>>>>>>>
>>>>>>>> I have a php script to dump the headers as follows:
>>>>>>>>
>>>>>>>> <?php
>>>>>>>> foreach($_SERVER as $h=>$v)
>>>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>>>> echo "<li>$h = $v</li>\n";
>>>>>>>> header('Content-type: text/html');
>>>>>>>> ?>
>>>>>>>>
>>>>>>>> The problem is that to show the headers, I redirect 192.168.40.1/* to
>>>>>>>> the above index.php page using the following redirect:
>>>>>>>>
>>>>>>>> Options +FollowSymlinks
>>>>>>>> RewriteEngine on
>>>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>>>
>>>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>>>
>>>>>>>> However the php request headers page always shows the URI as /
>>>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>>>> test.html).
>>>>>>>>
>>>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>>>
>>>>>>>
>>>>>>> Its apache, because it is redirecting, so PHP does only know about the
>>>>>>> redirected request, and does have no knowledge of how this request
>>>>>>> reached PHP.
>>>>>>
>>>>>> You could try the Proxy flag in the RewriteRule:
>>>>>>
>>>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>>>
>>>>> He can try a lot of things which won't work.
>>>>
>>>> Well, yes, but I didn't think my suggestion was one of them. If you
>>>> think it is, I would like to know why, so that I would know for the
>>>> future, rather than just be the target of a bit of sarcasm. You could
>>>> try something like "That won't work because...." (if applicable).
>>>>
>>>> The OP's original rule obviously wouldn't work, because it tells the
>>>> client browser to generate a completely fresh request with the new
>>>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>>>> make Apache proxy the original request to the new location (even to
>>>> itself if necessary). So the request's original headers should still
>>>> be present, with perhaps one or more proxy headers.
>>>>
>>>> Cheers
>>>> Tony
>>>>
>>>
>>> It's off topic in this newsgroup. If you want to know why, try an appropriate
>>> newsgroup.
>>>
>>
>> Truth is never off topic.
>>
>> /Str.
>>
>
> Only in your small mind. This is a PHP group - hence the "PHP" in its name. There
> are other groups where experts in that area hang out.
>
> And your comment shows why there are so many crappy answers to off-topic questions in
> this newsgroup.
>
Ah, small mind. What could PHP do without Apache servers?
/Str.
[toc] | [prev] | [next] | [standalone]
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Date | 2012-06-25 10:46 -0700 |
| Message-ID | <%t1Gr.28393$Bp1.24038@newsfe10.iad> |
| In reply to | #6425 |
On 6/25/12 10:17 AM, M. Strobel wrote:
> Am 25.06.2012 18:48, schrieb Jerry Stuckle:
>> On 6/25/2012 12:10 PM, M. Strobel wrote:
>>> Am 25.06.2012 16:44, schrieb Jerry Stuckle:
>>>> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>>>>> In article <js9pqt$1lm$1@dont-email.me>,
>>>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> wrote:
>>>>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>>>>
>>>>>>>>> I need to test various http requests from an application and am using
>>>>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>>>>> application proxy forwards http requests to the apache server's IP
>>>>>>>>> address like as follows:
>>>>>>>>>
>>>>>>>>> 192.168.40.1/test/test.html
>>>>>>>>>
>>>>>>>>> where 192.168.40.1 is the apache server.
>>>>>>>>>
>>>>>>>>> I have a php script to dump the headers as follows:
>>>>>>>>>
>>>>>>>>> <?php
>>>>>>>>> foreach($_SERVER as $h=>$v)
>>>>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>>>>> echo "<li>$h = $v</li>\n";
>>>>>>>>> header('Content-type: text/html');
>>>>>>>>> ?>
>>>>>>>>>
>>>>>>>>> The problem is that to show the headers, I redirect 192.168.40.1/* to
>>>>>>>>> the above index.php page using the following redirect:
>>>>>>>>>
>>>>>>>>> Options +FollowSymlinks
>>>>>>>>> RewriteEngine on
>>>>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>>>>
>>>>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>>>>
>>>>>>>>> However the php request headers page always shows the URI as /
>>>>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>>>>> test.html).
>>>>>>>>>
>>>>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>>>>
>>>>>>>>
>>>>>>>> Its apache, because it is redirecting, so PHP does only know about the
>>>>>>>> redirected request, and does have no knowledge of how this request
>>>>>>>> reached PHP.
>>>>>>>
>>>>>>> You could try the Proxy flag in the RewriteRule:
>>>>>>>
>>>>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>>>>
>>>>>> He can try a lot of things which won't work.
>>>>>
>>>>> Well, yes, but I didn't think my suggestion was one of them. If you
>>>>> think it is, I would like to know why, so that I would know for the
>>>>> future, rather than just be the target of a bit of sarcasm. You could
>>>>> try something like "That won't work because...." (if applicable).
>>>>>
>>>>> The OP's original rule obviously wouldn't work, because it tells the
>>>>> client browser to generate a completely fresh request with the new
>>>>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>>>>> make Apache proxy the original request to the new location (even to
>>>>> itself if necessary). So the request's original headers should still
>>>>> be present, with perhaps one or more proxy headers.
>>>>>
>>>>> Cheers
>>>>> Tony
>>>>>
>>>>
>>>> It's off topic in this newsgroup. If you want to know why, try an appropriate
>>>> newsgroup.
>>>>
>>>
>>> Truth is never off topic.
>>>
>>> /Str.
>>>
>>
>> Only in your small mind. This is a PHP group - hence the "PHP" in its name. There
>> are other groups where experts in that area hang out.
>>
>> And your comment shows why there are so many crappy answers to off-topic questions in
>> this newsgroup.
>>
> Ah, small mind. What could PHP do without Apache servers?
Quite a bit. Apache isn't a requirement for PHP by any means.
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2012-06-25 19:00 +0100 |
| Message-ID | <jsa8ve$bcc$1@news.albasani.net> |
| In reply to | #6427 |
Daniel Pitts wrote:
> On 6/25/12 10:17 AM, M. Strobel wrote:
>> Am 25.06.2012 18:48, schrieb Jerry Stuckle:
>>> On 6/25/2012 12:10 PM, M. Strobel wrote:
>>>> Am 25.06.2012 16:44, schrieb Jerry Stuckle:
>>>>> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>>>>>> In article <js9pqt$1lm$1@dont-email.me>,
>>>>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>>>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>>>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk
>>>>>>>> <luuk@invalid.lan> wrote:
>>>>>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>>>>>
>>>>>>>>>> I need to test various http requests from an application and
>>>>>>>>>> am using
>>>>>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>>>>>> application proxy forwards http requests to the apache
>>>>>>>>>> server's IP
>>>>>>>>>> address like as follows:
>>>>>>>>>>
>>>>>>>>>> 192.168.40.1/test/test.html
>>>>>>>>>>
>>>>>>>>>> where 192.168.40.1 is the apache server.
>>>>>>>>>>
>>>>>>>>>> I have a php script to dump the headers as follows:
>>>>>>>>>>
>>>>>>>>>> <?php
>>>>>>>>>> foreach($_SERVER as $h=>$v)
>>>>>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>>>>>> echo "<li>$h = $v</li>\n";
>>>>>>>>>> header('Content-type: text/html');
>>>>>>>>>> ?>
>>>>>>>>>>
>>>>>>>>>> The problem is that to show the headers, I redirect
>>>>>>>>>> 192.168.40.1/* to
>>>>>>>>>> the above index.php page using the following redirect:
>>>>>>>>>>
>>>>>>>>>> Options +FollowSymlinks
>>>>>>>>>> RewriteEngine on
>>>>>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>>>>>
>>>>>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>>>>>
>>>>>>>>>> However the php request headers page always shows the URI as /
>>>>>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>>>>>> test.html).
>>>>>>>>>>
>>>>>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Its apache, because it is redirecting, so PHP does only know
>>>>>>>>> about the
>>>>>>>>> redirected request, and does have no knowledge of how this request
>>>>>>>>> reached PHP.
>>>>>>>>
>>>>>>>> You could try the Proxy flag in the RewriteRule:
>>>>>>>>
>>>>>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>>>>>
>>>>>>> He can try a lot of things which won't work.
>>>>>>
>>>>>> Well, yes, but I didn't think my suggestion was one of them. If you
>>>>>> think it is, I would like to know why, so that I would know for the
>>>>>> future, rather than just be the target of a bit of sarcasm. You could
>>>>>> try something like "That won't work because...." (if applicable).
>>>>>>
>>>>>> The OP's original rule obviously wouldn't work, because it tells the
>>>>>> client browser to generate a completely fresh request with the new
>>>>>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>>>>>> make Apache proxy the original request to the new location (even to
>>>>>> itself if necessary). So the request's original headers should still
>>>>>> be present, with perhaps one or more proxy headers.
>>>>>>
>>>>>> Cheers
>>>>>> Tony
>>>>>>
>>>>>
>>>>> It's off topic in this newsgroup. If you want to know why, try an
>>>>> appropriate
>>>>> newsgroup.
>>>>>
>>>>
>>>> Truth is never off topic.
>>>>
>>>> /Str.
>>>>
>>>
>>> Only in your small mind. This is a PHP group - hence the "PHP" in
>>> its name. There
>>> are other groups where experts in that area hang out.
>>>
>>> And your comment shows why there are so many crappy answers to
>>> off-topic questions in
>>> this newsgroup.
>>>
>> Ah, small mind. What could PHP do without Apache servers?
> Quite a bit. Apache isn't a requirement for PHP by any means.
>
>
No but then neither is a road for a car, nevertheless I wouldn't
normally consider using a car off road ...
The clue of course is in the name
"While PHP originally stood for "Personal Home Page", it is now said to
stand for "PHP: Hypertext Preprocessor"." (wiki)
Frankly I have always felt Produces HHML Pages was nearer the mark.
--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.
[toc] | [prev] | [next] | [standalone]
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Date | 2012-06-25 11:22 -0700 |
| Message-ID | <i%1Gr.36565$rr2.29252@newsfe13.iad> |
| In reply to | #6431 |
On 6/25/12 11:00 AM, The Natural Philosopher wrote:
> Daniel Pitts wrote:
>> On 6/25/12 10:17 AM, M. Strobel wrote:
>>> Am 25.06.2012 18:48, schrieb Jerry Stuckle:
>>>> On 6/25/2012 12:10 PM, M. Strobel wrote:
>>>>> Am 25.06.2012 16:44, schrieb Jerry Stuckle:
>>>>>> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>>>>>>> In article <js9pqt$1lm$1@dont-email.me>,
>>>>>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>>>>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>>>>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk
>>>>>>>>> <luuk@invalid.lan> wrote:
>>>>>>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>>>>>>
>>>>>>>>>>> I need to test various http requests from an application and
>>>>>>>>>>> am using
>>>>>>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>>>>>>> application proxy forwards http requests to the apache
>>>>>>>>>>> server's IP
>>>>>>>>>>> address like as follows:
>>>>>>>>>>>
>>>>>>>>>>> 192.168.40.1/test/test.html
>>>>>>>>>>>
>>>>>>>>>>> where 192.168.40.1 is the apache server.
>>>>>>>>>>>
>>>>>>>>>>> I have a php script to dump the headers as follows:
>>>>>>>>>>>
>>>>>>>>>>> <?php
>>>>>>>>>>> foreach($_SERVER as $h=>$v)
>>>>>>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>>>>>>> echo "<li>$h = $v</li>\n";
>>>>>>>>>>> header('Content-type: text/html');
>>>>>>>>>>> ?>
>>>>>>>>>>>
>>>>>>>>>>> The problem is that to show the headers, I redirect
>>>>>>>>>>> 192.168.40.1/* to
>>>>>>>>>>> the above index.php page using the following redirect:
>>>>>>>>>>>
>>>>>>>>>>> Options +FollowSymlinks
>>>>>>>>>>> RewriteEngine on
>>>>>>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>>>>>>
>>>>>>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>>>>>>
>>>>>>>>>>> However the php request headers page always shows the URI as /
>>>>>>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>>>>>>> test.html).
>>>>>>>>>>>
>>>>>>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Its apache, because it is redirecting, so PHP does only know
>>>>>>>>>> about the
>>>>>>>>>> redirected request, and does have no knowledge of how this
>>>>>>>>>> request
>>>>>>>>>> reached PHP.
>>>>>>>>>
>>>>>>>>> You could try the Proxy flag in the RewriteRule:
>>>>>>>>>
>>>>>>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>>>>>>
>>>>>>>> He can try a lot of things which won't work.
>>>>>>>
>>>>>>> Well, yes, but I didn't think my suggestion was one of them. If you
>>>>>>> think it is, I would like to know why, so that I would know for the
>>>>>>> future, rather than just be the target of a bit of sarcasm. You
>>>>>>> could
>>>>>>> try something like "That won't work because...." (if applicable).
>>>>>>>
>>>>>>> The OP's original rule obviously wouldn't work, because it tells the
>>>>>>> client browser to generate a completely fresh request with the new
>>>>>>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>>>>>>> make Apache proxy the original request to the new location (even to
>>>>>>> itself if necessary). So the request's original headers should still
>>>>>>> be present, with perhaps one or more proxy headers.
>>>>>>>
>>>>>>> Cheers
>>>>>>> Tony
>>>>>>>
>>>>>>
>>>>>> It's off topic in this newsgroup. If you want to know why, try an
>>>>>> appropriate
>>>>>> newsgroup.
>>>>>>
>>>>>
>>>>> Truth is never off topic.
>>>>>
>>>>> /Str.
>>>>>
>>>>
>>>> Only in your small mind. This is a PHP group - hence the "PHP" in
>>>> its name. There
>>>> are other groups where experts in that area hang out.
>>>>
>>>> And your comment shows why there are so many crappy answers to
>>>> off-topic questions in
>>>> this newsgroup.
>>>>
>>> Ah, small mind. What could PHP do without Apache servers?
>> Quite a bit. Apache isn't a requirement for PHP by any means.
>>
>>
> No but then neither is a road for a car, nevertheless I wouldn't
> normally consider using a car off road ...
Straw man; the car/road analogy is lacking. There are *other* web
servers than Apache, such as nginx for example.
Asking an Apache specific question here is like asking a Windows
question on c.l.javascript.
[toc] | [prev] | [next] | [standalone]
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2012-06-25 21:09 +0200 |
| Message-ID | <4lpmb9-ke1.ln1@luuk.invalid.lan> |
| In reply to | #6432 |
On 25-06-2012 20:22, Daniel Pitts wrote: > > Asking an Apache specific question here is like asking a Windows > question on c.l.javascript. But someone who is working with PHP (or doing thing with it), should have basic knowledge about the environment where PHP is running...
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2012-06-26 00:11 +0100 |
| Message-ID | <jsar7h$gcg$5@news.albasani.net> |
| In reply to | #6434 |
Luuk wrote: > On 25-06-2012 20:22, Daniel Pitts wrote: >> Asking an Apache specific question here is like asking a Windows >> question on c.l.javascript. > > But someone who is working with PHP (or doing thing with it), should > have basic knowledge about the environment where PHP is running... > Unless their name is Jerry. > > -- To people who know nothing, anything is possible. To people who know too much, it is a sad fact that they know how little is really possible - and how hard it is to achieve it.
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-06-25 21:36 +0200 |
| Message-ID | <a4rstfFi5bU1@mid.uni-berlin.de> |
| In reply to | #6432 |
Am 25.06.2012 20:22, schrieb Daniel Pitts:
> On 6/25/12 11:00 AM, The Natural Philosopher wrote:
>> Daniel Pitts wrote:
>>> On 6/25/12 10:17 AM, M. Strobel wrote:
>>>> Am 25.06.2012 18:48, schrieb Jerry Stuckle:
>>>>> On 6/25/2012 12:10 PM, M. Strobel wrote:
>>>>>> Am 25.06.2012 16:44, schrieb Jerry Stuckle:
>>>>>>> On 6/25/2012 10:42 AM, Tony Mountifield wrote:
>>>>>>>> In article <js9pqt$1lm$1@dont-email.me>,
>>>>>>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>>>>>>> On 6/25/2012 9:36 AM, Tony Mountifield wrote:
>>>>>>>>>> In article <klslb9-ogk.ln1@luuk.invalid.lan>, Luuk
>>>>>>>>>> <luuk@invalid.lan> wrote:
>>>>>>>>>>> On 25-06-2012 12:15, brumik wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I need to test various http requests from an application and
>>>>>>>>>>>> am using
>>>>>>>>>>>> Apache/PHP on ubuntu to display the http request headers. The
>>>>>>>>>>>> application proxy forwards http requests to the apache
>>>>>>>>>>>> server's IP
>>>>>>>>>>>> address like as follows:
>>>>>>>>>>>>
>>>>>>>>>>>> 192.168.40.1/test/test.html
>>>>>>>>>>>>
>>>>>>>>>>>> where 192.168.40.1 is the apache server.
>>>>>>>>>>>>
>>>>>>>>>>>> I have a php script to dump the headers as follows:
>>>>>>>>>>>>
>>>>>>>>>>>> <?php
>>>>>>>>>>>> foreach($_SERVER as $h=>$v)
>>>>>>>>>>>> #if(ereg('HTTP_(.+)',$h,$hp))
>>>>>>>>>>>> echo "<li>$h = $v</li>\n";
>>>>>>>>>>>> header('Content-type: text/html');
>>>>>>>>>>>> ?>
>>>>>>>>>>>>
>>>>>>>>>>>> The problem is that to show the headers, I redirect
>>>>>>>>>>>> 192.168.40.1/* to
>>>>>>>>>>>> the above index.php page using the following redirect:
>>>>>>>>>>>>
>>>>>>>>>>>> Options +FollowSymlinks
>>>>>>>>>>>> RewriteEngine on
>>>>>>>>>>>> RewriteCond %{REQUEST_URI} !/index.php$
>>>>>>>>>>>>
>>>>>>>>>>>> RewriteRule $ /index.php [R=302,L]
>>>>>>>>>>>>
>>>>>>>>>>>> However the php request headers page always shows the URI as /
>>>>>>>>>>>> index.php as opposed to the 'original' URI requested (/test/
>>>>>>>>>>>> test.html).
>>>>>>>>>>>>
>>>>>>>>>>>> How can I get it to show the 'original' URI requested? is this
>>>>>>>>>>>> something that can be done in PHP or is it apache specific?
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Its apache, because it is redirecting, so PHP does only know
>>>>>>>>>>> about the
>>>>>>>>>>> redirected request, and does have no knowledge of how this
>>>>>>>>>>> request
>>>>>>>>>>> reached PHP.
>>>>>>>>>>
>>>>>>>>>> You could try the Proxy flag in the RewriteRule:
>>>>>>>>>>
>>>>>>>>>> RewriteRule $ http://localhost/index.php [P,L]
>>>>>>>>>
>>>>>>>>> He can try a lot of things which won't work.
>>>>>>>>
>>>>>>>> Well, yes, but I didn't think my suggestion was one of them. If you
>>>>>>>> think it is, I would like to know why, so that I would know for the
>>>>>>>> future, rather than just be the target of a bit of sarcasm. You
>>>>>>>> could
>>>>>>>> try something like "That won't work because...." (if applicable).
>>>>>>>>
>>>>>>>> The OP's original rule obviously wouldn't work, because it tells the
>>>>>>>> client browser to generate a completely fresh request with the new
>>>>>>>> location. In contrast, the Proxy flag in RewriteRule is supposed to
>>>>>>>> make Apache proxy the original request to the new location (even to
>>>>>>>> itself if necessary). So the request's original headers should still
>>>>>>>> be present, with perhaps one or more proxy headers.
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>> Tony
>>>>>>>>
>>>>>>>
>>>>>>> It's off topic in this newsgroup. If you want to know why, try an
>>>>>>> appropriate
>>>>>>> newsgroup.
>>>>>>>
>>>>>>
>>>>>> Truth is never off topic.
>>>>>>
>>>>>> /Str.
>>>>>>
>>>>>
>>>>> Only in your small mind. This is a PHP group - hence the "PHP" in
>>>>> its name. There
>>>>> are other groups where experts in that area hang out.
>>>>>
>>>>> And your comment shows why there are so many crappy answers to
>>>>> off-topic questions in
>>>>> this newsgroup.
>>>>>
>>>> Ah, small mind. What could PHP do without Apache servers?
>>> Quite a bit. Apache isn't a requirement for PHP by any means.
>>>
>>>
>> No but then neither is a road for a car, nevertheless I wouldn't
>> normally consider using a car off road ...
> Straw man; the car/road analogy is lacking. There are *other* web servers than
> Apache, such as nginx for example.
Yes, there are.
Nginx usage is in the one percent range according to
http://phpadvent.org/2010/usage-statistics-by-ilia-alshanetsky
I would consider nginx here quite off topic.
/Str.
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-06-25 21:15 +0100 |
| Message-ID | <timstreater-54A5CA.21154425062012@news.individual.net> |
| In reply to | #6431 |
In article <jsa8ve$bcc$1@news.albasani.net>, The Natural Philosopher <tnp@invalid.invalid> wrote: > Daniel Pitts wrote: [snip a lot of stuff that should have been snipped before] > No but then neither is a road for a car, nevertheless I wouldn't > normally consider using a car off road ... > > The clue of course is in the name > > "While PHP originally stood for "Personal Home Page", it is now said to > stand for "PHP: Hypertext Preprocessor"." (wiki) > > Frankly I have always felt Produces HHML Pages was nearer the mark. I use it as a general scripting language, personally, as well as with apache. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-06-25 22:24 +0200 |
| Message-ID | <a4rvneF88uU1@mid.uni-berlin.de> |
| In reply to | #6440 |
Am 25.06.2012 22:15, schrieb Tim Streater: > In article <jsa8ve$bcc$1@news.albasani.net>, > The Natural Philosopher <tnp@invalid.invalid> wrote: > >> Daniel Pitts wrote: > > [snip a lot of stuff that should have been snipped before] > >> No but then neither is a road for a car, nevertheless I wouldn't normally consider >> using a car off road ... >> >> The clue of course is in the name >> >> "While PHP originally stood for "Personal Home Page", it is now said to stand for >> "PHP: Hypertext Preprocessor"." (wiki) >> >> Frankly I have always felt Produces HHML Pages was nearer the mark. > > I use it as a general scripting language, personally, as well as with apache. Yes, it is "fast enough" if you take care not to have xdebug always loaded. But I prefer Tcl, it is so easy to quickly set up some input fields and buttons... /Str.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-06-25 16:32 -0400 |
| Message-ID | <jsaht3$12g$1@dont-email.me> |
| In reply to | #6441 |
On 6/25/2012 4:24 PM, M. Strobel wrote: > Am 25.06.2012 22:15, schrieb Tim Streater: >> In article <jsa8ve$bcc$1@news.albasani.net>, >> The Natural Philosopher <tnp@invalid.invalid> wrote: >> >>> Daniel Pitts wrote: >> >> [snip a lot of stuff that should have been snipped before] >> >>> No but then neither is a road for a car, nevertheless I wouldn't normally consider >>> using a car off road ... >>> >>> The clue of course is in the name >>> >>> "While PHP originally stood for "Personal Home Page", it is now said to stand for >>> "PHP: Hypertext Preprocessor"." (wiki) >>> >>> Frankly I have always felt Produces HHML Pages was nearer the mark. >> >> I use it as a general scripting language, personally, as well as with apache. > > Yes, it is "fast enough" if you take care not to have xdebug always loaded. > > But I prefer Tcl, it is so easy to quickly set up some input fields and buttons... > > /Str. > > There is no need to have xdebug loaded to use it as a general scripting language. And it's quite good at it, actually. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-06-25 23:40 +0100 |
| Message-ID | <timstreater-53C08B.23402125062012@news.individual.net> |
| In reply to | #6441 |
In article <a4rvneF88uU1@mid.uni-berlin.de>, "M. Strobel" <sorry_no_mail_here@nowhere.dee> wrote: > Am 25.06.2012 22:15, schrieb Tim Streater: > > In article <jsa8ve$bcc$1@news.albasani.net>, > > The Natural Philosopher <tnp@invalid.invalid> wrote: > > > >> Daniel Pitts wrote: > > > > [snip a lot of stuff that should have been snipped before] > > > >> No but then neither is a road for a car, nevertheless I wouldn't normally > >> consider > >> using a car off road ... > >> > >> The clue of course is in the name > >> > >> "While PHP originally stood for "Personal Home Page", it is now said to > >> stand for > >> "PHP: Hypertext Preprocessor"." (wiki) > >> > >> Frankly I have always felt Produces HHML Pages was nearer the mark. > > > > I use it as a general scripting language, personally, as well as with > > apache. > > Yes, it is "fast enough" if you take care not to have xdebug always loaded. What is xdebug? -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-06-26 09:27 +0200 |
| Subject | xdebug, was Re: Apache and php to show http request headers. |
| Message-ID | <a4t6j3FbabU1@mid.uni-berlin.de> |
| In reply to | #6448 |
Am 26.06.2012 00:40, schrieb Tim Streater: > In article <a4rvneF88uU1@mid.uni-berlin.de>, > "M. Strobel" <sorry_no_mail_here@nowhere.dee> wrote: > >> Am 25.06.2012 22:15, schrieb Tim Streater: >> > In article <jsa8ve$bcc$1@news.albasani.net>, >> > The Natural Philosopher <tnp@invalid.invalid> wrote: >> > >> Daniel Pitts wrote: >> > > [snip a lot of stuff that should have been snipped before] >> > >> No but then neither is a road for a car, nevertheless I wouldn't normally >> >> consider >> >> using a car off road ... >> >> >> >> The clue of course is in the name >> >> >> >> "While PHP originally stood for "Personal Home Page", it is now said to >> stand >> for >> >> "PHP: Hypertext Preprocessor"." (wiki) >> >> >> >> Frankly I have always felt Produces HHML Pages was nearer the mark. >> > > I use it as a general scripting language, personally, as well as with > apache. >> >> Yes, it is "fast enough" if you take care not to have xdebug always loaded. > > What is xdebug? Are you serious? I use it for interactive remote debugging of web scripts together with my IDE, and it is a big time saver. When you install it (xdebug.org), there is a xdebug.ini installed into /etc/php5/conf.d/ that will be included into your php-CLI as well. It slows your app down a lot, because it watches all the calls. /Str.
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.lang.php
csiph-web