| View previous topic :: View next topic |
| Author |
Message |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Mar 21, 2007 7:38 am Post subject: |
|
|
Never got error like this in my whole life, you're lucky
I guess you just need to add after use lib '....' this:
| Code: | | 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. |
|
| Back to top |
|
 |
gabeanderson
Joined: 20 Mar 2007 Posts: 3
|
Posted: Mar 21, 2007 2:17 pm Post subject: |
|
|
Thanks for the reply and suggestion, but still no luck. I've updated my code in both CGIs to this:
| Code: |
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:
| Quote: | 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 |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Mar 21, 2007 2:30 pm Post subject: |
|
|
The problem in trailing last slash. So you need:
| Code: |
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  |
|
| Back to top |
|
 |
gabeanderson
Joined: 20 Mar 2007 Posts: 3
|
Posted: Mar 21, 2007 4:20 pm Post subject: |
|
|
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:
| Quote: | 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 |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Mar 22, 2007 6:22 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|