1. I'm getting '500 Internal Server Error' when starting upload
This means there was an error while executing script.
Possible problems are:
» Wrong CHMOD on files and directories. (Should be 755 for .cgi files, 755 for cgi-bin folder, 777 for temp,uploads folders)
» You have windows linebreaks instead of unix inside .cgi scripts
To convert Win linebreaks to Unix use NewLine util from Steve Miller's 'Win32 Console ToolBox'
Example: newline.exe /1 upload.cgi
Also use binary FTP mode to upload scripts to your server
» You run script on windows server
Replace #!/usr/bin/perl with #!Perl in .cgi scripts
Specify full path to current folder in both .cgi scripts in this line: use lib '.'; (e.g. use lib '/var/www/mysite/cgi-bin/xupload';)
» Comment line in upload.cgi: local $SIG{__DIE__} = 'CleanUp';
2. Upload starting but after some seconds progress display message "Upload failed!"
This means temp file wasn't created after 15 seconds from upload start
Possible solutions are:
» Use correct full absolute paths in XUploadConfig.pm (e.g. target_dir => '/home/bogdanov/cgi-bin/UPLOAD/uploads')
» Your server have mod_gzip or mod_security enabled which are caching upload.
Make sure you have our .htaccess file in the same folder upload.cgi is and .htaccess files enabled on your server
» There was an error inside upload.cgi
To view error details in upload_form.html replace "frameborder=0 style" with "xframeborder=0 xstyle" to make hidden iframe visible, then try to upload again. Error should appear in this iframe.
3. What is upload mode?
Upload modes allow you to have multiple upload forms with different upload settings each.
e.g. you can have one form for photos only, another for one single video file and you don't need to install extra xupload copy, just create new upload mode.
To specify current upload mode you should have xmode hidden input in upload_form.html page (<input type="hidden" name="xmode" value="1">)
4. Can I upload to folder specified in form?
Yes, you can specify relative target dir in your upload form.
Just add input to upload_form.html(<input type="text" name="ext_folder">) and set allow_ext_folder option inside XUploadConfig to 1. Don't use absolute pathes there.
You can olny upload to subfolders inside master target_dir folder specified for current upload mode.
5. How can I receive upload info in my PHP script?
After upload complete, script POSTing upload info to URL specified in XUploadConfig url_post parameter.
There are 2 examples handling this POST data with Perl & PHP: post.cgi & post.php.
You can receive distinct parameters in PHP with code like this: "$address = $_POST['address'];"