On Fri, Sep 4, 2009 at 11:12 AM, Magnus Manske
<[email protected]>wrote:

> While I was on vacation, my CommonsHelper stopped working for direct
> upload. Here's what happens:
>
> * CommonsHelper (PHP) downloads an image to /tmp
> * CommonsHelper invokes upload bot written in Perl
> * Perl dies:
> Can't open file /tmp/chHHaikY-dir/dummy.jpg : No such file or
> directory at /opt/ts/perl/5.10/lib/vendor_perl/5.10/LWP/UserAgent.pm
> line 394
>
> However, the file exists at that point in time (this one still does on
> wolfsbane, feel free to check), and is readable for everyone.
>
> Any idea what's going on?
>

Yup. PHP exits and deletes the temp file before perl bot can start. Use
http://de.php.net/move_uploaded_file($_FILES['userfile']['tmp_name'],"/tmp/commonshelper-$random");
to prevent PHP from deleting the temp file.

Marco
-- 
VMSoft GbR
Nabburger Str. 15
81737 München
Geschäftsführer: Marco Schuster, Volker Hemmert
http://vmsoft-gbr.de
_______________________________________________
Toolserver-l mailing list ([email protected])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: 
https://wiki.toolserver.org/view/Mailing_list_etiquette

Reply via email to