XUpload - error "Not enough arguments for mkdir"

Message
Author
wavedave
Posts: 3
Joined: Oct 05, 2006 7:24 pm

error "Not enough arguments for mkdir"

#1 Postby wavedave » Oct 06, 2006 4:48 am

My uploads were failing in XUpload Pro but there wasn't enough information
in my error logs to identify the problem. Here's how I fixed it:

First, I enabled warnings by adding "-w" to the end of the first line
in all of the *.cgi scripts, like this:

before:

Code: Select all

#!/usr/bin/perl


after:

Code: Select all

#!/usr/bin/perl -w


The "-w" flag increases the level of error reporting in Perl
so you should change this back, after you're finished troubleshooting
to avoid filling up your error log with too much detail.

Next, I tried another upload and found this in my error log:

Code: Select all

Not enough arguments for mkdir at (path)/upload.cgi line 32, near "$temp_dir;"
Not enough arguments for mkdir at (path)/upload.cgi line 90, near "})"
upload.cgi: Execution of (path)/upload.cgi aborted due to compilation errors.


so I changed line 32 from this:

Code: Select all

mkdir $temp_dir;


to this:

Code: Select all

mkdir $temp_dir,0777;


and I changed line 90 from this:

Code: Select all

mkdir($c->{target_dir});


to this:

Code: Select all

mkdir($c->{target_dir},0777);


That fixed the problem. I'm not sure what caused the problem to start with but
I'm using an older version of Perl (ver 5.00503) so that might be the reason.

XUpload seems to be a great program so I hope this helps someone who's stuck.

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Oct 06, 2006 10:11 am

Thanks for this quick-fix note. Yes, it's old Perl version problem.
This fix already implemented in upcoming version that will be released next week I hope.

gimmo
Posts: 2
Joined: Feb 05, 2007 8:11 pm

bad seeds in temp dir (last pro version )

#3 Postby gimmo » Feb 05, 2007 8:17 pm

After uploading temp dir has:
when upload succeed - empty unusable directory
when upload fail - unusable directory with the part of uploaded file
How can it be corrected?
I.e. how this rests can be automaticaly removed?
Thanks.

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Feb 06, 2007 7:16 am

There's DeleteExpiredFiles routine removing old temp files every time after complete upload. This time is adjastable in config but shouldn't be too small.


Return to “XUpload”



Who is online

Users browsing this forum: No registered users and 0 guests