XUpload - Error after several tries....

Message
Author
Rocket2600
Posts: 4
Joined: Nov 21, 2006 8:17 am

Error after several tries....

#1 Postby Rocket2600 » Nov 21, 2006 8:22 am

http://www.comiccovers.net/upload001.html

My upload page.

I keep getting this error when trying to upload.

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.



I have read every post and do have the .htaccess file in place. Here is my code for the XLoadConfig.pm file:

Code: Select all

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

our $c=
{
 # Directory for temporary using files
 temp_dir        => '/home/comiccovers.net/covers/tmp',

 # Directory for uploaded files
 target_dir      => '/home/comiccovers.net/covers/upload',

 # Path to the template using for upload status window
 templates_dir   => '/home/comiccovers.net/cgi-bin/Templates',

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

 # The link to redirect after complete upload
 # This setting can be submitted from HTML form, then it will have priority
 redirect_link   => 'http://www.comiccovers.net/upload001.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 => 700000000,      

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

 # CSS names
 styles			 => { 'black'   => 'black.css',
			      'hitech'  => 'hi_tech.css',
			      'aqua'    => 'aqua.css',
			      'tiny'    => 'tiny.css',
                              'contrast'=> 'contrast.css',
			    },

 # Template names
 templates => { 'simple' => 'simple.html',
                'hitech' => 'hitech.html',
	        'nice'   => 'nice.html',
	      },
};

1;
I need help as I am at a lost here. :roll:

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

#2 Postby PilgrimX182 » Nov 21, 2006 8:25 am


Rocket2600
Posts: 4
Joined: Nov 21, 2006 8:17 am

#3 Postby Rocket2600 » Nov 21, 2006 8:43 am

1. Make sure temp & uploads folders CHMODed to 777, .cgi files CHMODed to 755 check, and doubled checked

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

3. All cgi scripts need to have Unix-style linebreaks (instead of DOS/Windows linebreaks) before they will work properly on a Unix system. Not 100% sure of this, but all I edited were the paths and changed no code in any of the files.

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: I have this file in place.



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

6. Try to comment this line inside upload.cgi: "local $SIG{__DIE__} = 'CleanUp';" I'm not getting a upload, so I don't think the cleanup is a problem.


If you still have any problems, provide these details in your post:
* Script type (Free/Pro) and version (2.0/2.2/2.3) Free 2.5
* Browser (IE/FF/Opera/Safari) IE 7
* OS (Win2k/WinXP/Mac/Linux) Webhost server Linux

Rocket2600
Posts: 4
Joined: Nov 21, 2006 8:17 am

#4 Postby Rocket2600 » Nov 21, 2006 8:53 am

I called my webhost to double check my path to CGI-BIN and they gave me the correct path.

Code: Select all

 # Directory for temporary using files
 temp_dir        => '/home/comicco/public_html/covers/tmp',

 # Directory for uploaded files
 target_dir      => '/home/comicco/public_html/covers/upload',

 # Path to the template using for upload status window
 templates_dir   => '/home/comicco/public_html/cgi-bin/Templates',
So I changed it to the following above. But I still get the Internal Server Error. :cry:

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

#5 Postby PilgrimX182 » Nov 21, 2006 8:59 am

I think it's windows linebreaks problem. Use binary transfer mode fro FTP. Anyway, the problem is to execute perl script, not script logic.

Rocket2600
Posts: 4
Joined: Nov 21, 2006 8:17 am

#6 Postby Rocket2600 » Nov 21, 2006 8:59 am

D'oh. :oops:

Found the error.

Make sure your CGI-BIN folder is set to 755 and not 777 as most webhost servers will block scripts for safety reasons.