php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67931 links to variadics on php.net does not redirect to mirror
Submitted: 2014-08-29 10:23 UTC Modified: 2014-08-29 11:27 UTC
From: php at bof dot de Assigned: tyrael (profile)
Status: Closed Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2014-08-29 10:23 UTC] php at bof dot de
Description:
------------
For me, following the link to the variadic function doc on the frontpage, when visiting http://php.net, misdirects to the manual lookup page on php.net, instead of redirecting to the right page on a mirror.

Ferenc asked me to report this here.

The issue depends on my IP; I'm using German T-Online with IP 91.53.9.6 at the moment, when it does not work.

See expected/actual results, "expected" from a different IP address somewhere else in Germany, "actual" from my home IP.

(NOTE: I manually added spaces between "http" and "://php.net..." below, because otherwise the bug tracker tells me "SPAM detected". Sigh.

Test script:
---------------
wget http ://php.net/functions.arguments.php

Expected result:
----------------
patrick@bof1:~> wget http ://php.net/functions.arguments.php
asking libproxy about url 'http://php.net/functions.arguments.php'
libproxy suggest to use 'direct://'
--2014-08-29 12:19:53--  http://php.net/functions.arguments.php
Resolving php.net... 72.52.91.14, 2001:470:1:380::3
Connecting to php.net|72.52.91.14|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http ://de2.php.net/functions.arguments.php [following]
asking libproxy about url 'http ://de2.php.net/functions.arguments.php'
libproxy suggest to use 'direct://'
--2014-08-29 12:19:53--  http ://de2.php.net/functions.arguments.php
Resolving de2.php.net... 82.100.240.32
Connecting to de2.php.net|82.100.240.32|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “functions.arguments.php”

    [  <=>                                  ] 108,840      530K/s   in 0.2s    

2014-08-29 12:19:54 (530 KB/s) - “functions.arguments.php” saved [108840]


Actual result:
--------------
patrick@rofl:~> wget http ://php.net/functions.arguments.php
--2014-08-29 12:19:08--  http ://php.net/functions.arguments.php
Resolving php.net (php.net)... 72.52.91.14, 2001:470:1:380::3
Connecting to php.net (php.net)|72.52.91.14|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http ://php.net/search.php?show=404quickref&lang=en&pattern=functions.arguments.php [following]
--2014-08-29 12:19:09--  http ://php.net/search.php?show=404quickref&lang=en&pattern=functions.arguments.php
Reusing existing connection to php.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http ://php.net/manual-lookup.php?pattern=functions.arguments.php&lang=en&scope=404quickref [following]
--2014-08-29 12:19:09--  http ://php.net/manual-lookup.php?pattern=functions.arguments.php&lang=en&scope=404quickref
Reusing existing connection to php.net:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘functions.arguments.php’

    [  <=>                                  ] 13,825      65.2KB/s   in 0.2s   

2014-08-29 12:19:09 (65.2 KB/s) - ‘functions.arguments.php’ saved [13825]


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-29 10:54 UTC] tyrael@php.net
I had a hard time reproducing the problem, as I was getting properly redirected to a mirror where the docs are working properly, but it seems that the https url can be used to reproduce the issue consistently:
https://www.php.net/functions.arguments.php
 [2014-08-29 11:24 UTC] tyrael@php.net
https://php.net/functions.arguments seems to be working and from a quick look find_manual_page($LANG, $URI) also expect the $URI to be without any file extension.
this still doesn't explain why was it morking for the mirrors or why do you not get redirected to the mirror in some cases.
I'm gonna update the NEWS entry with the removal of the .php suffix and that should solve the issue though.
 [2014-08-29 11:25 UTC] tyrael@php.net
-Assigned To: +Assigned To: tyrael
 [2014-08-29 11:27 UTC] salathe@php.net
It's also producible using "http://..." by adding an "X-Forwarded-For" header.

$ curl -v -H 'X-Forwarded-For: 127.0.0.1' http://php.net/functions.arguments.php
* About to connect() to php.net port 80 (#0)
*   Trying 72.52.91.14... connected
> GET /functions.arguments.php HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: php.net
> Accept: */*
> X-Forwarded-For: 127.0.0.1
> 
< HTTP/1.1 302 Found
< Server: nginx/1.6.1
< Date: Fri, 29 Aug 2014 11:21:28 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 0
< Connection: keep-alive
< X-Powered-By: PHP/5.5.11-2
< Content-language: en
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: COUNTRY=EUR%2C127.0.0.1; expires=Fri, 05-Sep-2014 11:21:28 GMT; Max-Age=604800; path=/; domain=.php.net
< X-PHP-Load: 3.23, 3.01, 3.12
< Location: http://php.net/search.php?show=404quickref&lang=en&pattern=functions.arguments.php
< 
* Connection #0 to host php.net left intact
* Closing connection #0
 [2014-08-29 11:28 UTC] tyrael@php.net
Automatic comment on behalf of kovacs.ferenc@ustream.tv
Revision: http://git.php.net/?p=web/php.git;a=commit;h=51b472cf0f85942d8df8d98d6891ea965d65bcfb
Log: fix bug #67931
 [2014-08-29 11:28 UTC] tyrael@php.net
-Status: Assigned +Status: Closed
 [2015-08-08 17:40 UTC] dragoonis@php.net
Automatic comment on behalf of kovacs.ferenc@ustream.tv
Revision: http://git.php.net/?p=web/php.git;a=commit;h=f6bb797b234947ce33a8586e2fe825a90940ebd1
Log: fix bug #67931
 [2015-08-09 00:06 UTC] tyrael@php.net
Automatic comment on behalf of kovacs.ferenc@ustream.tv
Revision: http://git.php.net/?p=web/php.git;a=commit;h=51b472cf0f85942d8df8d98d6891ea965d65bcfb
Log: fix bug #67931
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 05:01:31 2024 UTC