RustyRazor
asked on
ASP and Plesk - ActiveX unzip component
Hi All:
I'm trying to move my ASP-scripted website to a new host (GoDaddy) and their support has been less than stellar. I need to know how to access an ActiveX component that would allow a .zip to be unzipped on the server.
On my old host, the object is accessed as such:
Set objZip = Server.CreateObject("XStan dard.Zip")
No one seems to know what the name of this component, if any, would be on Plesk. The also offer Window Shared Hosting, but they couldn't answer for that one either. I get a vague response suggesting that they don't cover coding and to use whatever the "default" object is on ASP in general.
I'm frankly about to try a different web host, so I suppose anyone's recommendation for good webhosting would be a good addendum to this question.
I'm trying to move my ASP-scripted website to a new host (GoDaddy) and their support has been less than stellar. I need to know how to access an ActiveX component that would allow a .zip to be unzipped on the server.
On my old host, the object is accessed as such:
Set objZip = Server.CreateObject("XStan
No one seems to know what the name of this component, if any, would be on Plesk. The also offer Window Shared Hosting, but they couldn't answer for that one either. I get a vague response suggesting that they don't cover coding and to use whatever the "default" object is on ASP in general.
I'm frankly about to try a different web host, so I suppose anyone's recommendation for good webhosting would be a good addendum to this question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I really am not very versed in PHP. If you look down a little in that link you will see a note about using windows where you have to account for the back slash. See if this works.
Make attention when using this function with apache & windows system. Windows file system use \ (backslash) instead of unix / (slash)
Use str_replace like this.
<?php
$zip = new ZipArchive;
if ($zip->open("file.zip")){
$path = getcwd() . "/dirToextract/";
$path = str_replace("\\","/",$path);
echo $path;
echo $zip->extractTo($path);
$zip->close();
echo 'Done.';
} else {
echo "Error";
}
?>
ASKER
padas:
I accept the PHP script idea as the solution and I'll close this question out, but the code segment is generating a syntax error on the extractTo statement. I'll open a new question. Thanks.
I accept the PHP script idea as the solution and I'll close this question out, but the code segment is generating a syntax error on the extractTo statement. I'll open a new question. Thanks.
Sounds good. Just make sure you start with the topic for PHP.
https://www.experts-exchange.com/questions/28294099/PHP-unzip-on-IIS7-Windows-server.html
https://www.experts-exchange.com/questions/28294099/PHP-unzip-on-IIS7-Windows-server.html
ASKER
I've been trying a standard script:
Open in new window
It seems to be crashing on the extractTo line.
I also seem to be having trouble with pathing. for exmaple, if I specifiy /my/unarchive/dir/test.zip
Any thoughts? Would there be any server-side settings I need to be aware of? Of course the subdiectory in question has read/write permissions.