php-general Digest 14 Dec 2009 00:19:27 -0000 Issue 6486

Topics (messages 300453 through 300461):

Re: MySQL Appeal from Monty
        300453 by: metastable

Why does CURLOPT_FOLLOWLOCATION require open_basedir to be turned off?
        300454 by: Alex S Kurilo
        300457 by: Andy Shellam (Mailing Lists)
        300459 by: Alex S Kurilo

Re: Learning PHP
        300455 by: tedd
        300460 by: Robert H

Re: file_get_contents ($file) works -- file_get_contents ($url)  returns false
        300456 by: Ren¨¦ Fournier
        300458 by: Gaurav Kumar
        300461 by: Ren¨¦ Fournier

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]


----------------------------------------------------------------------
--- Begin Message ---
[email protected] wrote:
> Hi,
>
> You might have already seen this, however if you haven't this may interest 
> you:
>
> http://monty-says.blogspot.com/2009/12/help-saving-mysql.html
>
>   
Sent my appeal to [email protected] and I would suggest
everyone on this list does the same.
The European Union does not exactly have a good track record when it
comes to software and patents.



Best regards,

Stijn Verholen

--- End Message ---
--- Begin Message --- I was wondering why CURLOPT_FOLLOWLOCATION requires open_basedir and safe_mode to be turned off.

The following was found in the changelog(http://www.php.net/ChangeLog-5.php):

Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are enabled. (Stefan E., Ilia)

Also I read some forum posts about security restrictions blah-blah but didn't find anything specific, unfortunately.

Can anybody explain the reasons of such a strange restriction or tell what security issues raises CURLOPT_FOLLOWLOCATION when open_basedir is set?
--- End Message ---
--- Begin Message ---
Hi,

> I was wondering why CURLOPT_FOLLOWLOCATION requires open_basedir and 
> safe_mode to be turned off.
> 
> The following was found in the changelog(http://www.php.net/ChangeLog-5.php):
> 
> Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are 
> enabled. (Stefan E., Ilia)

I'm guessing that it would allow CURL to follow a link if a server returned a 
301 or 302 redirect.

For example, a PHP script consumes a web service or fetches a webpage from 
another server, then all of a sudden that remote server sends a 301/302 
redirect to a malicious page, CURL would then follow the redirect instead of 
returning an error.

If a server admin is paranoid enough to use safe_mode, they probably wouldn't 
want that to happen (note saying that being paranoid is a bad thing, but I've 
been managing PHP systems for years without safe_mode or open_basedir and never 
had an issue, but I can see why hosting providers may enable it.)

I can't see any conceivable benefit to this restriction when using 
open_basedir, as I thought that related to the local file system - unless CURL 
can use file:// URLs to access the local system?

Regards,
Andy

--- End Message ---
--- Begin Message ---
I can't see any conceivable benefit to this restriction when using 
open_basedir, as I thought that related to the local file system - unless CURL 
can use file:// URLs to access the local system?
That's the problem.
I always use open_basedir (not all the sites on my servers are safe enough). And that so called security restriction just makes me fury (unless I don't see significant reasons for it). So, in order not to irritate my nervous system every time somebody asks me to unset open_basedir for CURL I decided to find the roots of that PHP developers' action.

And I don't think it's related to the local file system: there is another option that restricts protocols while redirecting, CURLOPT_REDIR_PROTOCOLS, which allows by default all the protocols supported by CURL, but file and scp. So this kind of restriction (do not follow file:// while redirecting) would make sense, but not disabling FOLLOWLOCATION at all. Either they had a better reason or they messed up a bit :)

Still trying to find a better explanation.

--- End Message ---
--- Begin Message ---
At 12:27 PM -0500 12/12/09, Robert H wrote:
What is a good beginners programming book for PHP? I like "dead trees" more than reading stuff on my screen, so I am looking for a book.

Thanks!

Bob

Bob:

I've purchased and read literally scores of programming books and all have value. In fact, I've never read a book that I didn't learn something from.

However, IMO the best thing to learn in the beginning is that php does not live in a vacuum. It is a server-side programming language that cannot function to it's fullest without other languages.

As such, the best book I've read lately has been "PHP, MySQL & Javascript" by Nixon published by O'Reilly. You can buy it on Amazon for less than $27.00 and it's well worth the price.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On 12/13/09 8:50 AM, tedd wrote:

As such, the best book I've read lately has been "PHP, MySQL &
Javascript" by Nixon published by O'Reilly. You can buy it on Amazon for
less than $27.00 and it's well worth the price.

Cheers,

tedd

Thanks Tedd,

Bob


--- End Message ---
--- Begin Message ---
CURL works (remote and local)
file_get_contents() doesn't work (remote or local).



On 2009-12-13, at 4:39 PM, Gaurav Kumar wrote:

> Ok Agreed. 
> 
> Lets do one last chance to ensure that your system is allowing external 
> connections or connection to other systems in the network-
> 
> Use Curl to get in the file contents. Check your PHP that Curl is enabled. 
> Through phpinfo();
> 
> If the script output the google page then this means that there is nothing 
> that is stopping you form getting in the content externally.
> 
> <?php
> //     $str =  file_get_contents ('http://www.google.com');
> //     echo $str;
> 
> 
> // create a new cURL resource
> $ch = curl_init();
> 
> // set URL and other appropriate options
> curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in";); 
> //http://www.google.com
> curl_setopt($ch, CURLOPT_HEADER, 0);
> 
> // grab URL and pass it to the browser
> curl_exec($ch);
> 
> // close cURL resource, and free up system resources
> curl_close($ch);
> 
> ?>
> 
> Thanks,
> 
> Gaurav Kumar
> 
> 
> 
> 2009/12/13 René Fournier <[email protected]>
> The thing is, the file_get_contents() fails the same way on local URLs -- 
> that is, web sites hosted on the same machine. Or even using the machine's 
> own IP address.
> 
> On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote:
> 
>> Hi Rene,
>> 
>> The only thing which is a hurdle is that your system/computer is not 
>> allowing external connections. There seems to be nothing else wrong.
>> 
>> I strongly suggest check your system firewall, any central server settings 
>> through which your system gets internet access, any antivirus s/w installed 
>> etc.. this can be the only reason. Something is stopping you to access 
>> external connection.
>> 
>> Let me know when your problem is fixed.
>> Also I tried the below code and it works fine-
>> 
>> <?php
>>     $str =  file_get_contents ('http://www.google.com');
>>     echo $str;
>> ?>
>> 
>> Thanks,
>> 
>> Gaurav Kumar
>> 
>> 
>> 
>> 2009/12/11 René Fournier <[email protected]>
>> Hi Gaurav,
>> 
>> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>> 
>>> A very typical problem. Good you sent the error message.
>>> 
>>> This problem can be caused due to one of the following-
>>> 
>>> 1. I have faced similar problem due to local firewall settings.
>> 
>> Don't think this is it, since (1) the firewall settings haven't changed, and 
>> (2) other machines on the same network can execute this same code and 
>> function (but they aren't running OS X Server 10.6.
>> 
>>> 2. Try some other domain; i.e. other than google com. Try some of the local 
>>> area website with a particular page like www.somedomain.com/somefile.html
>> 
>> I've tried many different external and local web sites, and they all fail.
>> 
>>> 3. Some times the remote host does not allow you to connect to get the file 
>>> contents.
>> 
>> (Also not the cause -- as explained above.)
>> 
>> 
>>> 4. # 3 can be either way round from both the ends a) you host server does 
>>> not allow external connections b) Remote host does not allow anonymous 
>>> connection.
>> 
>> Thanks for the options. I don't think they apply in this case. If you have 
>> any other suggestions on what to do, I would welcome them.
>> 
>> 
>> 
>>> Gaurav Kumar
>>> blog.oswebstudio.com
>>> 
>>> 
>>> 
>>> On Thu, Dec 10, 2009 at 9:01 PM, René Fournier <[email protected]> 
>>> wrote:
>>> I thought error_reporting would display them, but I guess php.ini had them 
>>> suppressed. Anyway, with:
>>> 
>>> <?php
>>> 
>>> error_reporting(-1);
>>> ini_set('display_errors', 1);
>>> set_time_limit(0);
>>> var_dump (file_get_contents ('http://www.google.com'));
>>> 
>>> ?>
>>> 
>>> I get:
>>> 
>>> Warning: file_get_contents(http://www.google.com): failed to open stream: 
>>> Operation now in progress in /____/____.php on line 7 bool(false)
>>> 
>>> Does that help with the diagnosis?
>>> 
>>> 
>>> On 2009-12-10, at 12:28 AM, Richard Quadling wrote:
>>> 
>>> > 2009/12/9 René Fournier <[email protected]>:
>>> >> It is, and I use curl elsewhere in the same script to fetch remote 
>>> >> content.
>>> >> This exact same function works fine on my MacBook Pro (10.6 client, PHP 
>>> >> 5.3), and *was* previously working fine under Server 10.4.11 and PHP 5.3,
>>> >>
>>> >> On 2009-12-09, at 11:10 PM, laruence wrote:
>>> >>
>>> >>> try
>>> >>> wget http://www.google.com in your command line to see whether the 
>>> >>> network is reachable
>>> >>>
>>> >>> LinuxManMikeC wrote:
>>> >>>>
>>> >>>> On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC 
>>> >>>> <[email protected]> wrote:
>>> >>>>
>>> >>>>> On Wed, Dec 9, 2009 at 6:45 AM, René Fournier <[email protected]> 
>>> >>>>> wrote:
>>> >>>>>
>>> >>>>>> Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. 
>>> >>>>>> Any call of file_get_contents() on a local file works fine -- the 
>>> >>>>>> file is read and returned. But any call of file_get_contents on a 
>>> >>>>>> url -- any url, local or remote -- always returns false.
>>> >>>>>>
>>> >>>>>> var_dump (file_get_contents ('http://www.google.com/'));
>>> >>>>>>
>>> >>>>>> bool(false)
>>> >>>>>>
>>> >>>>>> I've checked php.ini, and the obvious seems okay:
>>> >>>>>>
>>> >>>>>>        allow_url_fopen => On => On
>>> >>>>>>
>>> >>>>>> Any ideas?
>>> >>>>>>
>>> >>>>>> ...Rene
>>> >>>>>>
>>> >>>>> http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
>>> >>>>>
>>> >>>>>
>>> >>>>
>>> >>>> "I've checked php.ini"
>>> >>>> Right, must remember not to reply to stuff till I'm awake. :-D
>>> >>>>
>>> >>>> --
>>> >>>> PHP General Mailing List (http://www.php.net/)
>>> >>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>> >>>>
>>> >>>>
>>> >>>
>>> >>> --
>>> >>> <2866791487_dbbbdddf9e.jpg>惠 新宸 xinchen.hui | 商务搜索部 | 
>>> >>> (+8610)82602112-7974 | <2866349865_203e53a6c6.jpg>:laruence
>>> >>
>>> >>
>>> >
>>> > Do you have ANY errors/warning/notices?
>>> >
>>> >
>>> >
>>> > --
>>> > -----
>>> > Richard Quadling
>>> > "Standing on the shoulders of some very clever giants!"
>>> > EE : http://www.experts-exchange.com/M_248814.html
>>> > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
>>> > ZOPA : http://uk.zopa.com/member/RQuadling
>>> 
>>> 
>> 
>> 
> 
> 


--- End Message ---
--- Begin Message ---
What is the value for
"allow_url_fopen<http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen>"
in your php.ini? It should be 1.





2009/12/13 René Fournier <[email protected]>

> CURL works (remote and local)
> file_get_contents() doesn't work (remote or local).
>
>
>
> On 2009-12-13, at 4:39 PM, Gaurav Kumar wrote:
>
> Ok Agreed.
>
> Lets do one last chance to ensure that your system is allowing external
> connections or connection to other systems in the network-
>
> Use Curl to get in the file contents. Check your PHP that Curl is enabled.
> Through phpinfo();
>
> If the script output the google page then this means that there is nothing
> that is stopping you form getting in the content externally.
>
> <?php
> //     $str =  file_get_contents ('http://www.google.com');
> //     echo $str;
>
>
> // create a new cURL resource
> $ch = curl_init();
>
> // set URL and other appropriate options
> curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in";); //
> http://www.google.com
> curl_setopt($ch, CURLOPT_HEADER, 0);
>
> // grab URL and pass it to the browser
> curl_exec($ch);
>
> // close cURL resource, and free up system resources
> curl_close($ch);
>
> ?>
>
> Thanks,
>
> Gaurav Kumar
>
>
>
> 2009/12/13 René Fournier <[email protected]>
>
>> The thing is, the file_get_contents() fails the same way on local URLs --
>> that is, web sites hosted on the same machine. Or even using the machine's
>> own IP address.
>>
>> On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote:
>>
>> Hi Rene,
>>
>> The only thing which is a hurdle is that your system/computer is not
>> allowing external connections. There seems to be nothing else wrong.
>>
>> I strongly suggest check your system firewall, any central server settings
>> through which your system gets internet access, any antivirus s/w installed
>> etc.. this can be the only reason. Something is stopping you to access
>> external connection.
>>
>> Let me know when your problem is fixed.
>> Also I tried the below code and it works fine-
>>
>> <?php
>>     $str =  file_get_contents ('http://www.google.com');
>>     echo $str;
>> ?>
>>
>> Thanks,
>>
>> Gaurav Kumar
>>
>>
>>
>> 2009/12/11 René Fournier <[email protected]>
>>
>>> Hi Gaurav,
>>>
>>> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>>>
>>> A very typical problem. Good you sent the error message.
>>>
>>> This problem can be caused due to one of the following-
>>>
>>> 1. I have faced similar problem due to local firewall settings.
>>>
>>>
>>> Don't think this is it, since (1) the firewall settings haven't changed,
>>> and (2) other machines on the same network can execute this same code and
>>> function (but they aren't running OS X Server 10.6.
>>>
>>> 2. Try some other domain; i.e. other than google com. Try some of the
>>> local area website with a particular page like
>>> www.somedomain.com/somefile.html
>>>
>>>
>>> I've tried many different external and local web sites, and they all
>>> fail.
>>>
>>> 3. Some times the remote host does not allow you to connect to get the
>>> file contents.
>>>
>>>
>>> (Also not the cause -- as explained above.)
>>>
>>>
>>> 4. # 3 can be either way round from both the ends a) you host server does
>>> not allow external connections b) Remote host does not allow anonymous
>>> connection.
>>>
>>>
>>> Thanks for the options. I don't think they apply in this case. If you
>>> have any other suggestions on what to do, I would welcome them.
>>>
>>>
>>>
>>> Gaurav Kumar
>>> blog.oswebstudio.com
>>>
>>>
>>>
>>> On Thu, Dec 10, 2009 at 9:01 PM, René Fournier <[email protected]>wrote:
>>>
>>>> I thought error_reporting would display them, but I guess php.ini had
>>>> them suppressed. Anyway, with:
>>>>
>>>> <?php
>>>>
>>>> error_reporting(-1);
>>>> ini_set('display_errors', 1);
>>>> set_time_limit(0);
>>>> var_dump (file_get_contents ('http://www.google.com'));
>>>>
>>>> ?>
>>>>
>>>> I get:
>>>>
>>>> Warning: file_get_contents(http://www.google.com): failed to open
>>>> stream: Operation now in progress in /____/____.php on line 7 bool(false)
>>>>
>>>> Does that help with the diagnosis?
>>>>
>>>>
>>>> On 2009-12-10, at 12:28 AM, Richard Quadling wrote:
>>>>
>>>> > 2009/12/9 René Fournier <[email protected]>:
>>>> >> It is, and I use curl elsewhere in the same script to fetch remote
>>>> content.
>>>> >> This exact same function works fine on my MacBook Pro (10.6 client,
>>>> PHP 5.3), and *was* previously working fine under Server 10.4.11 and PHP
>>>> 5.3,
>>>> >>
>>>> >> On 2009-12-09, at 11:10 PM, laruence wrote:
>>>> >>
>>>> >>> try
>>>> >>> wget http://www.google.com in your command line to see whether the
>>>> network is reachable
>>>> >>>
>>>> >>> LinuxManMikeC wrote:
>>>> >>>>
>>>> >>>> On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC <
>>>> [email protected]> wrote:
>>>> >>>>
>>>> >>>>> On Wed, Dec 9, 2009 at 6:45 AM, René Fournier <
>>>> [email protected]> wrote:
>>>> >>>>>
>>>> >>>>>> Strange problem I'm having on Mac OS X Server 10.6 running PHP
>>>> 5.3. Any call of file_get_contents() on a local file works fine -- the file
>>>> is read and returned. But any call of file_get_contents on a url -- any 
>>>> url,
>>>> local or remote -- always returns false.
>>>> >>>>>>
>>>> >>>>>> var_dump (file_get_contents 
>>>> >>>>>> ('http://www.google.com/')<http://www.google.com/%27%29>
>>>> );
>>>> >>>>>>
>>>> >>>>>> bool(false)
>>>> >>>>>>
>>>> >>>>>> I've checked php.ini, and the obvious seems okay:
>>>> >>>>>>
>>>> >>>>>>        allow_url_fopen => On => On
>>>> >>>>>>
>>>> >>>>>> Any ideas?
>>>> >>>>>>
>>>> >>>>>> ...Rene
>>>> >>>>>>
>>>> >>>>>
>>>> http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
>>>> >>>>>
>>>> >>>>>
>>>> >>>>
>>>> >>>> "I've checked php.ini"
>>>> >>>> Right, must remember not to reply to stuff till I'm awake. :-D
>>>> >>>>
>>>> >>>> --
>>>> >>>> PHP General Mailing List (http://www.php.net/)
>>>> >>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>> >>>>
>>>> >>>>
>>>> >>>
>>>> >>> --
>>>> >>> <2866791487_dbbbdddf9e.jpg>惠 新宸 xinchen.hui | 商务搜索部 |
>>>> (+8610)82602112-7974 | <2866349865_203e53a6c6.jpg>:laruence
>>>> >>
>>>> >>
>>>> >
>>>> > Do you have ANY errors/warning/notices?
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > -----
>>>> > Richard Quadling
>>>> > "Standing on the shoulders of some very clever giants!"
>>>> > EE : http://www.experts-exchange.com/M_248814.html
>>>> > Zend Certified Engineer :
>>>> http://zend.com/zce.php?c=ZEND002498&r=213474731
>>>> > ZOPA : http://uk.zopa.com/member/RQuadling
>>>>
>>>>
>>>
>>>
>>
>>
>
>

--- End Message ---
--- Begin Message ---
PHP Version     5.3.0

Directive       Local Value     Master Value
allow_call_time_pass_reference  Off     Off
allow_url_fopen On


On 2009-12-14, at 12:26 AM, Gaurav Kumar wrote:

> What is the value for "allow_url_fopen" in your php.ini? It should be 1.
> 
> 
> 
> 
> 
> 2009/12/13 René Fournier <[email protected]>
> CURL works (remote and local)
> file_get_contents() doesn't work (remote or local).
> 
> 
> 
> On 2009-12-13, at 4:39 PM, Gaurav Kumar wrote:
> 
>> Ok Agreed. 
>> 
>> Lets do one last chance to ensure that your system is allowing external 
>> connections or connection to other systems in the network-
>> 
>> Use Curl to get in the file contents. Check your PHP that Curl is enabled. 
>> Through phpinfo();
>> 
>> If the script output the google page then this means that there is nothing 
>> that is stopping you form getting in the content externally.
>> 
>> <?php
>> //     $str =  file_get_contents ('http://www.google.com');
>> //     echo $str;
>> 
>> 
>> // create a new cURL resource
>> $ch = curl_init();
>> 
>> // set URL and other appropriate options
>> curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in";); 
>> //http://www.google.com
>> curl_setopt($ch, CURLOPT_HEADER, 0);
>> 
>> // grab URL and pass it to the browser
>> curl_exec($ch);
>> 
>> // close cURL resource, and free up system resources
>> curl_close($ch);
>> 
>> ?>
>> 
>> Thanks,
>> 
>> Gaurav Kumar
>> 
>> 
>> 
>> 2009/12/13 René Fournier <[email protected]>
>> The thing is, the file_get_contents() fails the same way on local URLs -- 
>> that is, web sites hosted on the same machine. Or even using the machine's 
>> own IP address.
>> 
>> On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote:
>> 
>>> Hi Rene,
>>> 
>>> The only thing which is a hurdle is that your system/computer is not 
>>> allowing external connections. There seems to be nothing else wrong.
>>> 
>>> I strongly suggest check your system firewall, any central server settings 
>>> through which your system gets internet access, any antivirus s/w installed 
>>> etc.. this can be the only reason. Something is stopping you to access 
>>> external connection.
>>> 
>>> Let me know when your problem is fixed.
>>> Also I tried the below code and it works fine-
>>> 
>>> <?php
>>>     $str =  file_get_contents ('http://www.google.com');
>>>     echo $str;
>>> ?>
>>> 
>>> Thanks,
>>> 
>>> Gaurav Kumar
>>> 
>>> 
>>> 
>>> 2009/12/11 René Fournier <[email protected]>
>>> Hi Gaurav,
>>> 
>>> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>>> 
>>>> A very typical problem. Good you sent the error message.
>>>> 
>>>> This problem can be caused due to one of the following-
>>>> 
>>>> 1. I have faced similar problem due to local firewall settings.
>>> 
>>> Don't think this is it, since (1) the firewall settings haven't changed, 
>>> and (2) other machines on the same network can execute this same code and 
>>> function (but they aren't running OS X Server 10.6.
>>> 
>>>> 2. Try some other domain; i.e. other than google com. Try some of the 
>>>> local area website with a particular page like 
>>>> www.somedomain.com/somefile.html
>>> 
>>> I've tried many different external and local web sites, and they all fail.
>>> 
>>>> 3. Some times the remote host does not allow you to connect to get the 
>>>> file contents.
>>> 
>>> (Also not the cause -- as explained above.)
>>> 
>>> 
>>>> 4. # 3 can be either way round from both the ends a) you host server does 
>>>> not allow external connections b) Remote host does not allow anonymous 
>>>> connection.
>>> 
>>> Thanks for the options. I don't think they apply in this case. If you have 
>>> any other suggestions on what to do, I would welcome them.
>>> 
>>> 
>>> 
>>>> Gaurav Kumar
>>>> blog.oswebstudio.com
>>>> 
>>>> 
>>>> 
>>>> On Thu, Dec 10, 2009 at 9:01 PM, René Fournier <[email protected]> 
>>>> wrote:
>>>> I thought error_reporting would display them, but I guess php.ini had them 
>>>> suppressed. Anyway, with:
>>>> 
>>>> <?php
>>>> 
>>>> error_reporting(-1);
>>>> ini_set('display_errors', 1);
>>>> set_time_limit(0);
>>>> var_dump (file_get_contents ('http://www.google.com'));
>>>> 
>>>> ?>
>>>> 
>>>> I get:
>>>> 
>>>> Warning: file_get_contents(http://www.google.com): failed to open stream: 
>>>> Operation now in progress in /____/____.php on line 7 bool(false)
>>>> 
>>>> Does that help with the diagnosis?
>>>> 
>>>> 
>>>> On 2009-12-10, at 12:28 AM, Richard Quadling wrote:
>>>> 
>>>> > 2009/12/9 René Fournier <[email protected]>:
>>>> >> It is, and I use curl elsewhere in the same script to fetch remote 
>>>> >> content.
>>>> >> This exact same function works fine on my MacBook Pro (10.6 client, PHP 
>>>> >> 5.3), and *was* previously working fine under Server 10.4.11 and PHP 
>>>> >> 5.3,
>>>> >>
>>>> >> On 2009-12-09, at 11:10 PM, laruence wrote:
>>>> >>
>>>> >>> try
>>>> >>> wget http://www.google.com in your command line to see whether the 
>>>> >>> network is reachable
>>>> >>>
>>>> >>> LinuxManMikeC wrote:
>>>> >>>>
>>>> >>>> On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC 
>>>> >>>> <[email protected]> wrote:
>>>> >>>>
>>>> >>>>> On Wed, Dec 9, 2009 at 6:45 AM, René Fournier 
>>>> >>>>> <[email protected]> wrote:
>>>> >>>>>
>>>> >>>>>> Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. 
>>>> >>>>>> Any call of file_get_contents() on a local file works fine -- the 
>>>> >>>>>> file is read and returned. But any call of file_get_contents on a 
>>>> >>>>>> url -- any url, local or remote -- always returns false.
>>>> >>>>>>
>>>> >>>>>> var_dump (file_get_contents ('http://www.google.com/'));
>>>> >>>>>>
>>>> >>>>>> bool(false)
>>>> >>>>>>
>>>> >>>>>> I've checked php.ini, and the obvious seems okay:
>>>> >>>>>>
>>>> >>>>>>        allow_url_fopen => On => On
>>>> >>>>>>
>>>> >>>>>> Any ideas?
>>>> >>>>>>
>>>> >>>>>> ...Rene
>>>> >>>>>>
>>>> >>>>> http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
>>>> >>>>>
>>>> >>>>>
>>>> >>>>
>>>> >>>> "I've checked php.ini"
>>>> >>>> Right, must remember not to reply to stuff till I'm awake. :-D
>>>> >>>>
>>>> >>>> --
>>>> >>>> PHP General Mailing List (http://www.php.net/)
>>>> >>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>> >>>>
>>>> >>>>
>>>> >>>
>>>> >>> --
>>>> >>> <2866791487_dbbbdddf9e.jpg>惠 新宸 xinchen.hui | 商务搜索部 | 
>>>> >>> (+8610)82602112-7974 | <2866349865_203e53a6c6.jpg>:laruence
>>>> >>
>>>> >>
>>>> >
>>>> > Do you have ANY errors/warning/notices?
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > -----
>>>> > Richard Quadling
>>>> > "Standing on the shoulders of some very clever giants!"
>>>> > EE : http://www.experts-exchange.com/M_248814.html
>>>> > Zend Certified Engineer : 
>>>> > http://zend.com/zce.php?c=ZEND002498&r=213474731
>>>> > ZOPA : http://uk.zopa.com/member/RQuadling
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 


--- End Message ---

Reply via email to