Seem to have read just about every post but still am nowhere near getting XUpdatePro to work on IIS6
Does anyone have experience with getting this great code to run on IIS/Windows 2003 Server and can tell me what I'm doing wrong?
I've installed the latest version of ActivePerl in C:\Perl
Verified Perl is working with perl - v from the command line.
Made sure the .pl and .cgi extensions are mapped to PerlIS.dll
Enabled Perl extensions.
Created a virtual Directory /cgi-bin that points to C:\Perl\bin
Copied all directories and files to C:\Perl\bin\xuploadpro\
Modified the upload.cgi and upload_status.cgi to include:
#!Perl - at the top of the page
and
use lib 'c:/Perl/bin/xuploadpro';
chdir('c:/Perl/bin/xuploadpro');
Tried various combinations of Temp_Dir which include
'C:\Perl\bin\xuploadpro\temp'
'C:/Perl/bin/xuploadpro/temp'
'/temp'
'\temp'
Same for the Uploads dir.
Moved the HTML examples with xupload.js to the web root.
Modified the form action to point to '/cgi-bin/upload.cgi?upload_id='
When I run the upload_form.html I get a javascript error of
line 447 "max_upload_files" is undefined as soon as the page loads
When I run the upload_form_tiny.htm it loads fine, allows me to browse for a file, but selecting a file causes an error popup of
line 146 "ext_allowed" is undefined.
If I run http://localhost/cgi-bin/xuploadpro/upload.cgi
I get the status page that say 0 files uploaded, but no error messages to suggest the cgi is running fine.
Seems like the vars from XUploadConfig.pm are not being read.
I've tried just about every combination of directory permissions, but to no effect.
Definately pulling hair out!
Any advice would be much appreciated.
Thanks
Peter
XUpload - Has anyone had success with Windows/IIS?
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Try
http://localhost/cgi-bin/xuploadpro/upl ... e=settings
Also try
or
For temp & uploads dir can use relative path: 'temp', 'uploads'
If no luck we can try to make it work if you give us FTP access in PM.
http://localhost/cgi-bin/xuploadpro/upl ... e=settings
Also try
Code: Select all
use lib 'c:\Perl\bin\xuploadpro';
Code: Select all
use lib 'c:\\Perl\\bin\\xuploadpro';
If no luck we can try to make it work if you give us FTP access in PM.
Thanks PilgriMX182!
Not there yet - but getting much closer...
Calling the upload.cgi with mode=settings showed upload.cgi could not find the XUploadConfig.pm
Changing to either
use lib 'c:\Perl\bin\xuploadpro';
or
use lib 'c:\\Perl\\bin\\xuploadpro';
worked and now the link is returning the require JS vars.
good so far....
Now when I load the Upload_form.html the form shows the file size and number limits and allows me to select multiple files. (good)
Problem:
When I hit Upload Files I get a JS error popup that says
"Fatal Error: Can't open log file"
Can you help on this one?
Thanks
Peter
Not there yet - but getting much closer...
Calling the upload.cgi with mode=settings showed upload.cgi could not find the XUploadConfig.pm
Changing to either
use lib 'c:\Perl\bin\xuploadpro';
or
use lib 'c:\\Perl\\bin\\xuploadpro';
worked and now the link is returning the require JS vars.
good so far....
Now when I load the Upload_form.html the form shows the file size and number limits and allows me to select multiple files. (good)
Problem:
When I hit Upload Files I get a JS error popup that says
"Fatal Error: Can't open log file"
Can you help on this one?
Thanks
Peter
Managed to get XUploadPro working locally and works fine when accessed from a remoted computer. Great code!
I installed on the production server and hit the JS problem that returned
Expected ';'
Ran the .../upload.cgi?mode=settings and get a different response between local computer and production server. Both machines are running Win2003/IIS6.
Local computer (XUploadPro working) returns:
var ext_allowed='';var ext_not_allowed='';var max_upload_files=10;var max_upload_size=0.0;var descr_mode=0;var pass_required='';var email_required='';
Production Server (XUploadPro NOT working) returns:
Content-type: text/html var ext_allowed='';var ext_not_allowed='';var max_upload_files=10;var max_upload_size=0.0;var descr_mode=0;var pass_required='';var email_required='';
Could the additional text (Content-type: text/html) at the beginning be corrupting the JS insert?
If so, any idea wht's causing a different output?
Thanks
Peter
I installed on the production server and hit the JS problem that returned
Expected ';'
Ran the .../upload.cgi?mode=settings and get a different response between local computer and production server. Both machines are running Win2003/IIS6.
Local computer (XUploadPro working) returns:
var ext_allowed='';var ext_not_allowed='';var max_upload_files=10;var max_upload_size=0.0;var descr_mode=0;var pass_required='';var email_required='';
Production Server (XUploadPro NOT working) returns:
Content-type: text/html var ext_allowed='';var ext_not_allowed='';var max_upload_files=10;var max_upload_size=0.0;var descr_mode=0;var pass_required='';var email_required='';
Could the additional text (Content-type: text/html) at the beginning be corrupting the JS insert?
If so, any idea wht's causing a different output?
Thanks
Peter
Also used full location for temp and upload dirs - 'c:\uploads'
I then used Windows explorer and browsed to all files concerned including CGI, PM, the log files and temp and upload dirs - right-click - properties-security to give the IIS Guest USER read/write/execute permissions - I'm still tested what the minimum permission is to maintain best security.
Installed ActivePerl.
This configured the .pl and .plx extensions - you'll need to add the .cgi extension manually.
In IIS manager..
1. Select Properties for the web site (or web sites folder for all sites)
2. Select Home Directory Tab - Configuration
3. Add new extension CGI and browse to the Perl/bin dir to get perl.exe - you need to use C:\Perl\bin\perl.exe "%s" %s if you've used the default Perl install.
NOTE: changing this did remove the content text mentioned in the previous post and XUpload now works fine on my production server. BUT found my local setup is using perlis.dll for cgi extensions - and works fine ???. I just tried changing the production server back to perlis.dll and it coughed out the content text such the JS insert fails. Reverted to perl.exe as above and it's fine.
Peter
I then used Windows explorer and browsed to all files concerned including CGI, PM, the log files and temp and upload dirs - right-click - properties-security to give the IIS Guest USER read/write/execute permissions - I'm still tested what the minimum permission is to maintain best security.
Installed ActivePerl.
This configured the .pl and .plx extensions - you'll need to add the .cgi extension manually.
In IIS manager..
1. Select Properties for the web site (or web sites folder for all sites)
2. Select Home Directory Tab - Configuration
3. Add new extension CGI and browse to the Perl/bin dir to get perl.exe - you need to use C:\Perl\bin\perl.exe "%s" %s if you've used the default Perl install.
NOTE: changing this did remove the content text mentioned in the previous post and XUpload now works fine on my production server. BUT found my local setup is using perlis.dll for cgi extensions - and works fine ???. I just tried changing the production server back to perlis.dll and it coughed out the content text such the JS insert fails. Reverted to perl.exe as above and it's fine.
Peter