<div class="gmail_quote">On Fri, Sep 4, 2009 at 11:12 AM, Magnus Manske <span dir="ltr">&lt;<a href="mailto:magnusmanske@googlemail.com">magnusmanske@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

While I was on vacation, my CommonsHelper stopped working for direct<br>
upload. Here&#39;s what happens:<br>
<br>
* CommonsHelper (PHP) downloads an image to /tmp<br>
* CommonsHelper invokes upload bot written in Perl<br>
* Perl dies:<br>
Can&#39;t open file /tmp/chHHaikY-dir/dummy.jpg : No such file or<br>
directory at /opt/ts/perl/5.10/lib/vendor_perl/5.10/LWP/UserAgent.pm<br>
line 394<br>
<br>
However, the file exists at that point in time (this one still does on<br>
wolfsbane, feel free to check), and is readable for everyone.<br>
<br>
Any idea what&#39;s going on?<br></blockquote></div><br>Yup. PHP exits and deletes the temp file before perl bot can start. Use <a href="http://de.php.net/move_uploaded_file($_FILES[&#39;userfile&#39;][&#39;tmp_name&#39;],">http://de.php.net/move_uploaded_file($_FILES[&#39;userfile&#39;][&#39;tmp_name&#39;],</a>&quot;/tmp/commonshelper-$random&quot;); to prevent PHP from deleting the temp file.<br clear="all">

<br><div>Marco<br>-- <br>VMSoft GbR<br>Nabburger Str. 15<br>81737 München<br>Geschäftsführer: Marco Schuster, Volker Hemmert<br><a href="http://vmsoft-gbr.de">http://vmsoft-gbr.de</a><br>
</div>