|
||||
| ||||
|
|
#1 |
|
Hall Of Famer
Join Date: Dec 2001
Location: Union City, TN
Posts: 6,383
|
Script to unzip league files to leaguesite probs.....
I have a script that is supposed to let me zip up my league files and place them on my space, then I would call this script and it would unzip those files to my LeagueSite folder much like the OLS has.
I am getting an error and need help with this. Here is the script that I have placed in my cgi-bin on my space: ---------------------------- #!/usr/bin/perl use strict; use CGI::Carp qw(fatalsToBrowser); my $Verzeichnis = "/public-html/LeagueSite/"; my $zipfile = $Verzeichnis . "_ubl.zip"; if (-e $zipfile) { $r = system("unzip -o -q -C $zipfile -d $Verzeichnis"); if ($r==0) { print "Success!\n"; unlink($zipfile); } else { print "Error " . $r . "\n"; } } ---------------------------- When I call the script, I get the following error: Software error: Global symbol "$r" requires explicit package name at unzipfiles.cgi line 10. Global symbol "$r" requires explicit package name at unzipfiles.cgi line 11. Global symbol "$r" requires explicit package name at unzipfiles.cgi line 16. Execution of unzipfiles.cgi aborted due to compilation errors. Does anyone have any idea of how to fix this script so that it will work? Someone put this script on this board sometime back and I am just now getting to where I want to use it. The name I'm using for my zip file is '_ubl.zip' and I want it to go to the LeagueSite directory. I'm hoping Andreas sees this. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
OK, I saw it
|
|
|
|
|
|
#3 |
|
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
j/k
![]() Unfortunately I'm no Perl freak.... but I guess you have to initialize the $r with the my statement like my $r=0; Or something like that. Don't we have any Perl freaks here? ![]() Ah, and the value in $Verzeichnis is probably not correct. It's the correct path in your web space, but you must provide the complete path on the server! So you need the information what the real path of your web space on that server is. Can be someting like /homepages/cust65243/home... |
|
|
|
|
|
#4 |
|
Hall Of Famer
Join Date: Dec 2001
Location: Union City, TN
Posts: 6,383
|
Will the script used on the OLS not work on our own servers with modifications?
|
|
|
|
|
|
#5 |
|
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
No.
What you're showing above is the core of my script and that should work. IF the path was correct. But the script on the OLS is longer and makes more. What you don't need for a single league. |
|
|
|
|
|
#6 |
|
Minors (Single A)
Join Date: Jan 2002
Posts: 81
|
Mark,
I would suggest getting ahold of Finn. I think you're using his article script? If you don't have his contact info, e-mail me and I'll get it to you. He helped me "tweak" my article script, and he is a perl freak. |
|
|
|
|
|
#7 |
|
Major Leagues
Join Date: Apr 2002
Location: Phoenix, AZ
Posts: 404
|
This is why I pay for web hosting. When it comes to the tech side of what is going on I am more lost than anyone. I mean, if I had a problem understanding Pearl, I would try to contact Steinbeck, not this Finn guy.... unless Finn is John's username.
(Good luck Cooley)
__________________
http://www.nobl.net This is your father's league. |
|
|
|
|
|
#8 |
|
Major Leagues
Join Date: Dec 2001
Location: under an overpass
Posts: 459
|
I'd also like to use this script for my leage, so if anyone has a solution, please post it here.
|
|
|
|
![]() |
| Bookmarks |
|
|