[TYPO3-dev] @file_get_contents($url) returns nothing when running script from cronjob
Brian Bendtsen
bb at bellevuevej.dk
Wed Oct 1 17:53:51 CEST 2008
Xavier Perseguers skrev:
> Hi,
>
>>>> Im calling the script like this:
>>>>
>>>> * * * * * php
>>>> /var/www/typo3/my_t3_site/typo3conf/ext/aux_newsmailer/mailer/mailer.sh
>>>>
>>>> Is that not enough?
>>>>
>>>> /Brian
>>>
>>>
>>> Probably: no. The directory from which pathes will get resolved is
>>> probably either / or the home directory of the user running the
>>> script. You need to do an explicit "cd".
>>
>> Im not sure I understand this - can you show an example?
>
> This means
>
> * * * * * cd /var/www/typo3/my_t3_site && php
> typo3conf/ext/aux_newsmailer/mailer/mailer.sh
>
> BTW, your script should be named mailer.phpsh instead of .sh but that's
> not a blocking point.
>
Ok but I still dont get any images when running this cron job.
Im debugging like this(in class.t3lib_htmlmail.php(line 2636):
t3lib_div::devLog('t3lib_div file_get_contents', 'auxmailer',1,
array($url,$content));
The result when running the script from command line:
0 ../../../../typo3temp/pics/517c22379a.jpg
1 ÿÃÿà �JFIF��H�H��ÿÃ�C�nnn nZ%Z# ,
#&')*)-0-(0%()(ÿÃ�Cnnnn(ZZ((((((((((((((((((((((((((((((((((((((((((((((((((ÿÃ��W�â"ÿÃ���������������ÿÃ�E�
�����!1AQa"2Â#3Bq¡bâ±ÃÃ$CSUââ£%'RTsâ¢áðÿÃ�������������ÿÃ�3���������!Q"1A¡Ra±#3bqââÃáSðñÿÃ���?�ÂjV3ÃÃæYÃ+â°Ãì*mTÃ=|ÃEìt~!µ¿â f´â`Ž£ºiÃpX¿:âñfªúE½»%ºH÷I9!ÃC0�Ã'çÅÃãwäèÃâÃâ{iÃÃòÃÂT§¹µ¡+nµ`ÂÃrÃq�-¢74ÃÃgçÆÅ¡Â¯c^îU}»¶ÂÃ#®r[¼WoÃð½Ã)ÆÃÃÃõxçêÃSáûåúTÃ3*ÃâgQÃ?þs4â·ô÷šCâ¬ÃÃ
@©6²Nâ¢hÃ}Ãy²XÃazÃ
޵_,Yâ§ÃoVoÃã@¹%p{û°GÃóªâµÃš¶HKIP¹õ溵ÃnÃ;@â¢\â¸åøÃ¢ÃR0]LÃ9�çÂ0YEý"w<Ãâ?Kçâº5Ãóonvâ ÃöhÃ~gâ¢"ÃÃLââ¦Ãšñõ{âºâ F¸@UÅ~@Ãâ¬.-`Soc-Ãuâ0@Ãn$Ã-âIÅ¡ÃTÃȌZÃ�eAù¯:YÂÃ5â¦Âªld»2G8"5owéAÃ¥ýÃoâ£]Ãâ0ZÃÃ|<ydøSjÃGìâÃÃi/z%Ãç9r©¬ºÃ
éžOöç9&ðo´â¢ÃLâzâ¦Ã¢ÃI§\[F©n¶ôb>g5ª8÷Â
±Rì0)ŸÆÃŽ#±ââ¾
Å ÂqZ¬Ã´ÃpGtÂÃ1ÃV#'4à ±§ÃÃlâžâ¡ÃñVGÃ&Âdò<fPÃOnâ$â¡Ã®Â©+Hx Qâ Â5Uúq\GÃÃ
xcVÃ)CÃ[&Å8ÃFŽG»â=²{IÃ6HeÃóq³ÃI²âkHÃý!èñà þ4£Ë¨5;èn¶[Hn^r¬ÃÃNþâ«Tâ¡Ã¡EuZZªÃGÂ?ÃEmpUÃF0#EkÃ$Â5(â]\kZÂöñ¤99Ã4ÃË6¾&#Ÿ<Rý@(¼m¼â1oâ¹ÃRMâ¡h_ÃEøüÃi±7paýâÂçx©OñTZÂ¥âÃâÃw%ç·'Â¥DŽìtøÃÃ
©Gâºsþ±¾?â¢zŸÃ
Zü~C4Lâ°Â¬j<¸ÃÂ#â¹{§CÅÅ¡Ëñ[êº|ñüm$ò³HHS¢X&2yý[ÂëhR&û_YÂËx-C\A<â-ij¢òÃâ¢Â£i(2w�Ã1Væâ¢.±W73:ÃcÂ[.ÃLóÃÃ^XçUnË#Zâ¢â´�aÃðÃîþyÃÂ¥^zuÂÅÃ=ÅêÂdÃŽ
äO¦+âÂ¥Fó~K¢Ã:ÃYqâi
è)wy*âÃÂ¥Ã"6þÃ29rÃ<gõÃw/Ã5¼â¹Ã¬Ãóâ UúÃÃÃâVþH°à âºÂ¿lÃdmÃÃHâÃ0�ŸÃ5ÃìÂßâ¹Ã ....AND
MUCH MORE
When run as cron job:
0 ../../../../typo3temp/pics/517c22379a.jpg
1
So nothing in the $content
/Brian
More information about the TYPO3-dev
mailing list