[TYPO3-dev] @file_get_contents($url) returns nothing when running script from cronjob

Bjoern Pedersen Bjoern.Pedersen at frm2.tum.de
Wed Oct 1 16:32:30 CEST 2008


Brian Bendtsen <bb at bellevuevej.dk> writes:

> Dmitry Dulepov skrev:
>> Hi!
>> Brian Bendtsen wrote:
>>> I am using the t3lib_div::getURL($url) but this uses the
>>> @file_get_contents($url) function right?
>> Depends on the configuration.
>>
> You are thinking about cUrl? This is not set.
>
> I know by debugging that its running file_get_contents - is cUrl
> better or what do you suggest?
>
> /Brian

from the php documentation:
Filesystem is the default wrapper used with PHP and represents the
local filesystem. When a relative path is specified (a path which does
not begin with /, \, \\, or a Windows drive letter) the path provided
will be applied against the current working directory. In many cases
this is the directory in which the script resides unless it has been
changed. Using the CLI sapi, this defaults to the directory from which
the script was called. 

That means, you should probably change to the script directory before
calling the command line script.




More information about the TYPO3-dev mailing list