"Can't locate" error

XUpload related questions

Moderator: admin

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

#16 Postby PilgrimX182 » Mar 21, 2007 7:38 am

Never got error like this in my whole life, you're lucky :)
I guess you just need to add after use lib '....' this:

Code: Select all

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


Also read this doc: http://www.sibsoft.net/forum/viewtopic.php?t=84

Anyway I recommend Pro version for Windows server since we've fixed a lot of issues for Win there.

gabeanderson
Posts: 3
Joined: Mar 20, 2007 5:10 pm
Contact:

#17 Postby gabeanderson » Mar 21, 2007 2:17 pm

Thanks for the reply and suggestion, but still no luck. I've updated my code in both CGIs to this:

Code: Select all

use lib 'D:\inetpub\WEBSITES\WWW_2007\support\upload2\';
chdir('D:\inetpub\WEBSITES\WWW_2007\support\upload2\');


I also reviewed the other link you provided.

Here's the error I'm now getting:

Software error:

syntax error at D:\inetpub\WEBSITES\WWW_2007\support\upload2\upload_status.cgi line 8, near "chdir('D"
Execution of D:\inetpub\WEBSITES\WWW_2007\support\upload2\upload_status.cgi aborted due to compilation errors.


I'd be happy to use the pro version, but I need to be sure this will work as expected. The CGI uploader script I'm currently using times out and freezes my system on large uploads (I've already increased the IIS CGI timeout from the default 300 to 3000 seconds).

Thanks,
Gabe

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

#18 Postby PilgrimX182 » Mar 21, 2007 2:30 pm

The problem in trailing last slash. So you need:

Code: Select all

use lib 'D:\inetpub\WEBSITES\WWW_2007\support\upload2';
chdir('D:\inetpub\WEBSITES\WWW_2007\support\upload2');


If this will help, in upload_status.cgi change "for(1..3)" to "for(1..15)" to avoid 'Upload complete' wrong messages. This is cause Win caching files and temp file appear on HDD not instantly. Windows server is evil :)

gabeanderson
Posts: 3
Joined: Mar 20, 2007 5:10 pm
Contact:

#19 Postby gabeanderson » Mar 21, 2007 4:20 pm

Thanks, I made those changes and it looked like it worked now, but still 2 big problems:

1) There was no upload status meter (just a blank window).
2) The file did not appear on the server.

I did, however, get this text:

Transfer complete!
- Close -


Also, how do you account for times when a user attempts to upload a file with the name of a file already on the server? Can uploads have time/date appended to file name to make them unique?

Thanks,
Gabe

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

#20 Postby PilgrimX182 » Mar 22, 2007 6:22 am

Then the problem is inside upload.cgi. Check out Apache logs or to view error in browser in upload_form.html make 'upload' iframe visible by removing style from it.

Right now if filename already exist on server it Rename/Rewrite or Warn user about it. This is configurable in XUploadConfig.pm using 'copy_mode' option. However if you wanna add unique timestap to filename you should add this code line: "$fn.='_'.time;" after "my ($fn,$ext) = ($1,$2);" in upload.cgi. This will add amount of seconds since 1970 to filename.


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 1 guest