RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
error "Not enough arguments for mkdir"

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
wavedave



Joined: 05 Oct 2006
Posts: 3

PostPosted: Oct 06, 2006 4:48 am    Post subject: error "Not enough arguments for mkdir" Reply with quote

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:
#!/usr/bin/perl


after:
Code:
#!/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:
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:
mkdir $temp_dir;


to this:

Code:
mkdir $temp_dir,0777;


and I changed line 90 from this:

Code:
mkdir($c->{target_dir});


to this:

Code:
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.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Oct 06, 2006 10:11 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
gimmo



Joined: 05 Feb 2007
Posts: 2

PostPosted: Feb 05, 2007 8:17 pm    Post subject: bad seeds in temp dir (last pro version ) Reply with quote

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.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Feb 06, 2007 7:16 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group