You are here:  » ERROR - UNZIP FAILED

Support Forum



ERROR - UNZIP FAILED

Submitted by Mel on Fri, 2012-04-13 13:40 in

Hi David,
I'm sorry but I have this ERROR - UNZIP FAILED in Automation Url. This is my URL: {link saved}
Why? I have replace
$config_automationHandler = "curl";

in config.advanteges.php but don't run.

I have always ERROR - UNZIP FAILED

Thanks
Mel

Submitted by support on Fri, 2012-04-13 13:54

Hello Mel,

First check the Support Info page of your /admin/ area and look under Unzip Handlers - I suspect at least gzip is showing as Unavailable (your feed is gzipped compressed).

If that is the case the first thing to try would be an alternative version for the gzip program. Try editing config.advanced.php and replace line 47:

  $config_automationUnzipPrograms["gzip"] = "/bin/gzip";

...with:

  $config_automationUnzipPrograms["gzip"] = "/usr/bin/gzip";

If that still shows Unavailable; I have recently created an alternative version of includes/automation.php. Open that file, and add the following code to the end:

  function automation_unzip_phpgzip($tmp)
  {
    $gfp = gzopen($tmp,"r");
    if (!$gfp) return FALSE;
    $fp = fopen($tmp.".ungzipped","w");
    if (!$fp) return FALSE;
    while(!gzeof($gfp)) fwrite($fp,gzread($gfp,2048));
    fclose($fp);
    gzclose($gfp);
    unlink($tmp);
    rename($tmp.".ungzipped",$tmp);
    return TRUE;
  }

Finally, go back to config.advanced.php and replace line 47:

  $config_automationUnzipPrograms["gzip"] = "/bin/gzip";

...with:

 $config_automationUnzipPrograms["phpgzip"] = "";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Mel on Fri, 2012-04-13 14:27

Hi David,
I'm trying all but dont'run. On my server gzip is ok, it's actived. Can you see? Here http://www.gidnetwork.com/tools/gzip-test.php my site is {link saved}

Automation Handlers
php: Available
curl: Available

Automation Unzip Programs
unzip: Not Available
gzip: Not Available

I don't understand this error. Sorry for my bad english.

Mel

Submitted by support on Fri, 2012-04-13 14:31

Hello Mel,

The test at www.gidnetwork.com is to check your main website for gzip compression, which is unrelated to your server being able to execute programs which I think is the case - it looks like your PHP installation is running in "Safe Mode" which restricts access from PHP to the file system.

If you try the modification to add phpgzip to your includes/automation.php that should do the trick...

If you are not sure, if you like to email me your config.advanced.php I will make the change for you to make gzip work...

Cheers,
David.
--
PriceTapestry.com

Submitted by Mel on Mon, 2012-04-16 14:55

Hi David.
Now it's correct but I now have another problem. All file have same filename: "tmp.unzipped" but I need of filename different. tmp.unziped, mel.unzipped, david.unzipped and more.

Regards
Mel

Submitted by support on Mon, 2012-04-16 15:00

Hello Mel,

I thought this was fixed when I changed your includes/automation.php however it maybe because of the files already existing under a different user.

Please try connecting to your site via FTP, and then go into /feeds/ folder and delete each of the files that are in there.

Then run your jobs again from Automation Tool and if that was the problem there should be nothing called something.unzipped (they are just temporary files)...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com