'max_upload_files' undefined

XUpload related questions

Moderator: admin

Message
Author
chrisdpucci
Posts: 9
Joined: Oct 11, 2006 6:15 pm

'max_upload_files' undefined

#1 Postby chrisdpucci » Nov 17, 2006 1:25 pm

I'm pulling my hair out on this one.

I have Xupload Pro 2.2 configured and working great on one server. I now trying to get version 2.3 configured on a brand new server. I've tried everything I can think of, but I still get the javascript error: 'max_upload_files' undefined. I know that means that the script is not properly reading the config file, but I can't seem to figure out why.

Information about my set up is below:

Apache Version: 1.3.37 (Unix)
Perl Version: 5.8.7
Path to Perl: /usr/bin/perl

Link to Upload Form: http://www.mv2media3.com/upload_form.html

Config File:

package XUploadConfig;
use strict;
use Exporter ();
@XUploadConfig::ISA = qw(Exporter);
@XUploadConfig::EXPORT = qw($c);
use vars qw( $c );

$c=
{
# Directory for temporary using files (local path from root, not URL)
temp_dir => '/home/media3/public_html/cgi-bin/temp',

modes =>
{
1 =>
{
# Directory for uploaded files (local path from root)
target_dir => '/home/media3/public_html/cgi-bin/uploads',

# URL to send all input values from upload page
url_post => 'http://www.mv2media3.com/cgi-bin/post.php',

# Max number of upload fields
max_upload_files => 1,

# Minimum total upload size in Kbytes (leave empty or zero to disable)
min_upload_size => 70,

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

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|rar|zip|mp3|avi|txt|csv|wma',
},
2 =>
{
# Directory for uploaded files
target_dir => '/local/path/to/another/uploads',

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

# Minimum total upload size in Kbytes
min_upload_size => 50,

# Max number of upload fields
max_upload_files => 2,

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

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg|gif|png|rar|zip|mp3|avi|txt|csv|wma',
},
},

# 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',

# Filename required mask (use standard perl regexp)
# Extension is not using here (e.g. will use 'song123' for 'song123.mp3')
# Leave empty if you don't need this custom filename validation
# Examples: '^\w+$' - alphanumeric only, '^photo' - starting with 'photo'
filaname_mask => '',

# Filename rename mask (use standard perl regexp)
# Removing all characters except these from the mask
# Extension is not using here (e.g. will use 'song123' for 'song123.mp3')
# Leave empty if you don't need this custom filename renaming
# Examples: 'a-zA-Z' - will keep letters only, '\w' - will keep alphanumeric only
filename_rename_mask => '',

# Allow relative folder path for uploading files from HTML form ext_folder field
# Pathes with '..' are not allowed
# 0=no,1=yes. [Security Warning!]
allow_ext_folder => 0,

# Password for upload (optional)
# Allow uploads only with correct password. Add '<input type="password" name="upload_password">' to your upload_form.html to use this feature.
# Leave empty to disable
upload_password => '',

# Email field required (optional)
# Force users to enter their email address. Upload notification to that email will be sent.
# Leave empty to disable, set to 1 to enable
email_required => '',

# Logfile name
uploads_log => 'log.txt',

# Enable users to add descriptions to files
enable_file_descr => 1,

# Uploaded files expiration time # days
# Leave blank or zero to disable
uploaded_files_lifetime => 30,

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

# IP restrictions
# Examples: '^(10\.0\.0\.182)$' - allow only 10.0.0.182, '^(10\.0\.1\.125|10\.0\.0\.\d+)$' - allow 10.0.1.125 & 10.0.0.* (*=number is wildcard)
ip_allowed => '^(10\.0\.0\.\d+)$',

##### Email confirmation #####
# Leave all fields blank OR comment them if you don't want to send confirmations

# Path to sendmail
sendmail_path => '/usr/sbin/sendmail',

# Email that confirmations will be sent to
confirm_email => '[email protected]',

# This email will be in "From:" field in confirmation emails
confirm_email_from => '[email protected]',

# Subject for email notification
email_subject => "Xupload: new file uploaded",

##### Custom error messages #####

msg => { filesize_exceeded => "Maximum upload size exceeded<br>Please stop transfer right now.<br>Max filesize is: ",
filesize_min_exceeded => "Minimum upload size limit detected.<br>Please stop transfer right now.<br>Min filesize is:",
no_temp_dir => "No temp dir exist! Please fix your temp_dir variable in config.",
no_target_dir => "No target dir exist! Please fix your target_dir variable in config.",
no_templates_dir => "No Templates dir exist! Please fix your templates_dir variable in config.",
transfer_complete => "Transfer complete!",
transfer_failed => "Upload failed!",
null_filesize => "have null filesize or wrong file path",
bad_filename => "is not acceptable!",
bad_extension => "have unallowed extension!",
too_many_files => "wasn't saved! Number of files limit exceeded.",
already_exist => "already exist!<br>Renaming to ",
saved_ok => "was saved successfully.",
wrong_password => "You've entered wrong password.<br>Authorization required.",
ip_not_allowed => "You are not allowed to upload files",
},

##########

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

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

1;


If you have any ideas as to why I can't get this to work, I would appreciate it.

thanks,

Chris

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

#2 Postby PilgrimX182 » Nov 17, 2006 1:30 pm

http://www.mv2media3.com/cgi-bin/upload ... e=settings

Error in upload.cgi script.

2 possible problems: bad CHMOD, windows linebreaks.

chrisdpucci
Posts: 9
Joined: Oct 11, 2006 6:15 pm

#3 Postby chrisdpucci » Nov 17, 2006 2:05 pm

Upload.cgi is chmod 777 right now. I've tried various permissions, none of which seem to work. Should it be set to something else or are there other files that need to have the permissions changed?

Also about the windows line breaks, I'm not sure I fully understand that. I edited the config file in textedit for Mac and edited the upload form in dreamweaver. I haven't changed the upload.cgi script at all?

chrisdpucci
Posts: 9
Joined: Oct 11, 2006 6:15 pm

#4 Postby chrisdpucci » Nov 19, 2006 2:19 pm

Well, I finally figured it out. The issue was with my new ftp program and the way it was transfering the files. I changed it to binary and it works great. Alot of headache for something so simple, but I'm glad I finally got it working. :lol:


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests