XUpload - [newbie] Xupload don't work

Message
Author
zempa
Posts: 5
Joined: Feb 21, 2007 1:12 pm

[newbie] Xupload don't work

#1 Postby zempa » Feb 21, 2007 1:26 pm

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:
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 =
window.open('cgi-bin/upload_status.cgi?upload_id='+UID,'win1','width=320,height=240,resizable=1');
and
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.

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

#2 Postby PilgrimX182 » Feb 21, 2007 2:59 pm

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?

zempa
Posts: 5
Joined: Feb 21, 2007 1:12 pm

#3 Postby zempa » Feb 21, 2007 3:10 pm

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.

zempa
Posts: 5
Joined: Feb 21, 2007 1:12 pm

#4 Postby zempa » Feb 21, 2007 3:49 pm

Here is the errors from the apache log file:
[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... :)


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. ... 4447bbf2e1
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!