RE: [mirrors] Status information
| From: | Erich Pletsch | Date: | Wed, 05 May 2010 15:36:19 +0000 |
| Subject: | RE: [mirrors] Status information | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-38143@lists.php.net to get a copy of this message | ||
Hannes:
Here's what I get when I run the command:
>
[root@phpnet ~]# php -dtrack_errors=1 -r '$ctx =
stream_context_get_default(array("http" => array("user_agent" =>
"php.net"))); $retval = file_get_contents("http://www.php.net/ws.php?profile=manual&q=foo&lang=en&results=10&start=1&mirror=us3.php.net",
false, $ctx); var_dump($retval, $http_response_header, $php_errormsg,
ini_get("default_socket_timeout"));'
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning:
file_get_contents(http://www.php.net/ws.php?profile=manual&q=foo&lang=en&results=10&start=1&mirror=us3.php.net):
failed to open stream: HTTP request failed! in Command line code on line 3
Warning:
file_get_contents(http://www.php.net/ws.php?profile=manual&q=foo&lang=en&results=10&start=1&mirror=us3.php.net):
failed to open stream: HTTP request failed! in Command line code on line 3
bool(false)
array(0) {
}
string(44) "failed to open stream: HTTP request failed! "
string(2) "60"
>
That error message is the same one we were getting from the debug code that I put out there
yesterday during my testing.
The problem is that we don't get any meaningful reason for why it failed. And I can wget and
curl the file just fine, so it's definitely something related to php/apache:
[root@phpnet ~]# curl "http://www.php.net/ws.php?profile=manual&q=foo&lang=en&results=10&start=1&mirror=us3.php.net"
a:1:{s:9:"ResultSet";a:6:{s:4:"type";s:3:"web";s:21:"totalResultsAvailable";i:36;s:20:"totalResultsReturned";i:10;s:19:"firstResultPosition";i:1;s:10:"moreSearch";s:76:"/WebSearchService/V1/webSearch?query=foo&appid=www.php.net&region=us";s:6:"Result";a:10:{i:0;a:8:{s:5:"Title";s:29:"PHP:
get_object_vars - Manual";s:7:"Summary";s:174:"will iterate over the array,
iterating over "1" and "2", but ignoring $obj->foo ... they have no
...
>
I've built a new mirror on 5.3.2 which passes the tests fine. So, I'm probably just going
to swap in the new mirror today, but I'm keeping this other one for a little bit longer today
to see if we can figure out what the issue is to help others.
Erich
-----Original Message-----
From: Hannes Magnusson [mailto:hannes.magnusson@gmail.com]
Sent: Wednesday, May 05, 2010 1:54 AM
To: Erich Pletsch
Cc: Philip Olson; php-mirrors@lists.php.net; Mike Maughan; Marc Spafford
Subject: Re: [mirrors] Status information
On Wed, May 5, 2010 at 01:10, Erich Pletsch <e.pletsch@c7dc.com> wrote:
> Yes. I did check that.
>
> We have done extensive work trying to troubleshoot the issue, including putting in debug code,
> etc. However, we are not getting a meaningful error from PHP. In fact, we get no error, warning
> or message at all. It just returns an empty result from the call to file_get_contents()
>
> I can wget the file it requests using file_get_contents() just fine, so it is specific to
> php/apache and not an issue with the firewall or DNS.
>
Please try executing this from the command line:
$ php -dtrack_errors=1 -r '$ctx =
stream_context_get_default(array("http" => array("user_agent" =>
"php.net"))); $retval =
file_get_contents("http://www.php.net/ws.php?profile=manual&q=foo&lang=en&results=10&start=1&mirror=us3.php.net",
false, $ctx); var_dump($retval, $http_response_header, $php_errormsg,
ini_get("default_socket_timeout"));'
-Hannes
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.814 / Virus Database: 271.1.1/2853 - Release Date: 05/04/10 00:27:00