[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    [PHP] Re: file_get_contents doesn't work on one particular server
From:       98.201.4.202
Date:       2009-04-30 0:07:27
Message-ID: A0.BF.14567.EBBE8F94 () pb1 ! pair ! com
[Download RAW message or body]

Shawn McKenzie wrote:
> Brian Dunning wrote:
>> Howdy all - We have a production server that runs our script fine. We're
>> setting up a test server, and this particular script returns a length of
>> zero:
>>
>> $ctx = stream_context_create(array('http' => array('timeout' => 1200)));
>> // 20 minutes per file
>> $contents = file_get_contents($full_url, 0, $ctx);
>>
>> You can paste the $full_url into a browser and it works fine (it's
>> always a PDF document). It works fine with the same variables on the
>> production server. Is there some configuration option that we've missed
>> that's preventing it from working? Note that this is all https, and I
>> did notice this difference in the phpinfo() but don't know if it's
>> relevant:
>>
>> Production server: PHP 5.2.6
>> Registered PHP streams: php, file, data, http, ftp, compress.zlib,
>> compress.bzip2, https, ftps, zip
>>
>> Test server: PHP 5.2.9-2
>> Registered PHP streams: php, file, data, http, ftp, compress.zlib
>>
>>
> 
> Most likely allow_url_fopen = Off in the test server php.ini.  If you
> had error reporting on it would tell you.
> 

Sorry, didn't pay attention to the registered streams :-(

You need to install a PHP package with ssl or compile it with
--with-openssl.

-- 
Thanks!
-Shawn
http://www.spidean.com

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic