Read this first if your XUpload don't work

XUpload related questions

Moderator: admin

Message
Author
User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

Read this first if your XUpload don't work

#1 Postby PilgrimX182 » Oct 12, 2006 2:35 pm

Here goes most usual problem solvers:

1. Make sure temp & uploads folders CHMODed to 777,
.cgi files CHMODed to 755
cgi-bin folder CHMODed to 755

2. Use absolute paths in XUploadConfog.pm (e.g. target_dir => '/home/bogdanov/cgi-bin/UPLOAD/uploads')

3. All cgi scripts need to have Unix-style linebreaks (instead of DOS/Windows linebreaks) before they will work properly on a Unix system.
Also use binary FTP upload mode to avoid linebreaks convertion.
UPDATE: I've created special tool to remove windows linebreaks from your files: http://sibsoft.net/cgi-bin/Tools/nl.cgi

4. Probably your uploads being cached by mod_security or mod_gzip. You should disable them for uploads, create .htaccess file in the same folder upload.cgi is with these lines:

Code: Select all

<IfModule mod_security.c>
SetEnvIfNoCase Content-Type \
"^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
</IfModule>

<IfModule mod_gzip.c>
mod_gzip_on No
</IfModule>


5. Make sure 'action' form parameter follows to correct upload.cgi URL in upload_form.html

6. Try to comment this line inside upload.cgi: "local $SIG{__DIE__} = 'CleanUp';"

7. If you're running script on IIS, change first line in .cgi to "#!Perl"

Also try to change in both .cgi scripts:

Code: Select all

use lib '.';

to

Code: Select all

use lib '/path/to/script/folder';
chdir('/path/to/script/folder');


Also if your upload stop in the middle under IIS, increase CGI script timeout:
http://www.microsoft.com/technet/commun ... 2.mspx#EOD
http://www.iis-resources.com/modules/AM ... toryid=509

8. If your upload completed but no redirect happenes, make sure you don't have input/button with name 'submit' in your upload form.

9. If you're running XUpload on OS X server you should DISABLE Performance Cache & set KeepAlive On in your Apache config.

10. Try to disable or tune your firewall. We've been reported that some versions of BitDefender cause to wrong handling of persistent connections.

11. If your script don't redirect you after upload, comment or blank "confirm_email" option in XUploadConfig.pm

12. If you have problems with uploading file bigger than 2Gb, update your Apache or try another browser. Apache support files greater than 2Gb since 2.2 version only.

13. If you get message "Upload Complete" when trying to upload files over 128Mb, but with small files it's ok, change limit in your mod_security configuration file (usually modsec2.conf):

Code: Select all

SecRequestBodyLimit 1342177280


14. If scipt gives error that it can't open logs.txt file but it's chmod'ed correctly, this is probably cause of SELinux security thing that don't allow write in cgi-bin folder. To fix this issue go to cgi-bin and run these commands in console:

Code: Select all

chcon -t httpd_sys_script_rw_t logs.txt
chcon -R -t httpd_sys_script_rw_t uploads
chcon -R -t httpd_sys_script_rw_t temp

or these if the ones above doesn't help

Code: Select all

chcon -R -u system_u -t httpd_sys_content_t temp
chcon -R -u system_u -t httpd_sys_content_t uploads

Note: you can check that upload.cgi works fine using link like this: http://www.YOURSERVER.com/.../upload.cgi

If you still have any problems, please provide these details in your post:
* Script type (Free/Pro) and version
* Browser (IE/FF/Opera/Safari)
* OS (Win2k/WinXP/Mac/Linux/OS X)
* URL to upload_form.html (can PM me for security)

Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 1 guest