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
[newbie] Xupload don't work

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



Joined: 21 Feb 2007
Posts: 5

PostPosted: Feb 21, 2007 1:26 pm    Post subject: [newbie] Xupload don't work Reply with quote

hello,

i've just discovered xupload and i've decided to try it.
I downloaded the free version (2.6) and i 've made my tests through xampp (a apache-php-mysql blundle) under windows (localhost).

So, i moved the content of the folder into a cgi-bin directory (htdocs\mysite\cgi-bin) and the upload_form.html file into htdocs\mysite\.

here is the XUploadConfig.pm file:
Quote:

package XUploadConfig;

BEGIN
{
use Exporter;
@XUploadConfig::ISA = qw( Exporter );
@XUploadConfig::EXPORT = qw( $c );
}

our $c=
{
# Directory for temporary using files
temp_dir => "http://localhost/mysite/cgi-bin/temp',

# Directory for uploaded files
target_dir => 'http://localhost/mysite/cgi-bin/uploads',

# Path to the template using for upload status window
templates_dir => 'http://localhost/mysite/cgi-bin/Templates',

# Allowed file extensions delimited with '|'
ext_allowed => 'jpg|jpeg|gif|png|rar|zip|mp3|avi|txt|csv',

# URL to send all input values from upload page
url_post => 'http://localhost/mysite/cgi-bin/post.cgi',

# The link to redirect after complete upload
# This setting can be submitted from HTML form, then it will have priority
redirect_link => 'http://localhost/mysite/upload_form.html',

# Max length of uploaded filenames(without ext). Longer filenames will be cuted.
max_name_length => 64,

# Type of behavior when uploaded file already exist on disc. Available 3 modes: Rewrite/Rename/Warn
copy_mode => 'Rename',

# Maximum total upload size in Kbytes
max_upload_size => 70000000,

# Time to keep temp upload files on server, sec (24 hours = 86400 seconds)
temp_files_lifetime => 86400,

};

1;


and i change the urls of the upload_form.html file like this:
win1 =
Quote:
window.open('cgi-bin/upload_status.cgi?upload_id='+UID,'win1','width=320,height=240,resizable=1');

and
Quote:
action="cgi-bin/upload.cgi?upload_id="


I also change the size of uploaded file in the php.ini.

But when i launch a uploading i receve this error message:
"couldn't create child process: 720003: upload_status.cgi"
Error 500


EDIT: i access to the upload page (the page where we select the file to upload) but the uploading doesn't work :/

Did i miss something?

Thanks for the answer.
Back to top
View user's profile Send private message
PilgrimX182



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

PostPosted: Feb 21, 2007 2:59 pm    Post subject: Reply with quote

So I guess you run this all on Windows? Then replace "#!/usr/bin/perl" to "#!Perl" also specify full path to folder in line "use lib '/full/path/there';" in .cgi scripts, also add "chmod('/full/path/there');" directly after use lib line;

Look inside Apache error_log, what's the error details?
Back to top
View user's profile Send private message Visit poster's website
zempa



Joined: 21 Feb 2007
Posts: 5

PostPosted: Feb 21, 2007 3:10 pm    Post subject: Reply with quote

thanks PilgrimX182 for your answer!

Exactly, i run on windows.

Well, i've understood that the problem deals with those paths and i'm trying solving it.
But i 've a question: which lib should i include?
Actually, there is no 'lib' directory in xampp (i've the lite version) :/


EDIT: ok, i 'm installaing active perl (a perl blundle for windows) and then i'm going to make the needed changes.
... i'm testing...

EDIT:
Well i made the changes and it appears that all work fine... but nothing has been uploaded :/
i'm checking the logs ...


Last edited by zempa on Feb 21, 2007 3:50 pm; edited 2 times in total
Back to top
View user's profile Send private message
zempa



Joined: 21 Feb 2007
Posts: 5

PostPosted: Feb 21, 2007 3:49 pm    Post subject: Reply with quote

Here is the errors from the apache log file:
Quote:
[Wed Feb 21 16:43:21 2007] [error] [client 127.0.0.1] [Wed Feb 21 16:43:21 2007] upload.cgi: Can't copy file from temp dir at C:/xampplite/htdocs/testxupload/cgi-bin/upload.cgi line 153.
[Wed Feb 21 16:43:51 2007] [error] [client 127.0.0.1] [Wed Feb 21 16:43:51 2007] upload.cgi: Can't copy file from temp dir at C:/xampplite/htdocs/testxupload/cgi-bin/upload.cgi line 153.


I guess there is a permission problem... i'm trying to find out... Smile


EDIT: i don't know if it there is a link with the permission problem but i 've just find that the temp dir ( htdocs/testxupload/cgi-bin/temp ) is set to read-only. When i change it, it turn back to read-only mode?!

FINAL EDIT:
that's it!!!
i 've followed the intructions here:
http://www.sibsoft.net/forum/viewtopic.php?p=83&sid=46f6d6f480487e459e6bf24447bbf2e1
the problem was about the paths of temp,target and templates dir into the XUploadConfig.pm file.
I put the absolute path and then it works fine!!

Thanks for your helping, you give me the way to solve my problems!
Back to top
View user's profile Send private message
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