PHP ZIP functionality on all servers? (4 posts)

  1. Leo Blanchette
    Posted 3 years ago #

    Strangely I cannot seem to google a clear answer on this -

    I'm using a PHP function to zip a file created in a plugin.

    Is the likelihood of php supporting ZIP in a wordpress environment very likely? Or are there common instances where ZIP is not supported?

  2. catacaustic
    very awesome
    Posted 3 years ago #

    This depends completely on the host. some include it, some don't. You will have to ask the hosting company/companies to see if it is supported on their server.

  3. Leo Blanchette
    Posted 3 years ago #

    Thanks! This is a plugin, so I'll have to check conditionally I guess.
    Can do a simple class_exists('ZipArchive');check I suppose. Thanks a lot.

  4. Yui
    Ice & Fire
    Posted 3 years ago #

    you always have to perform conditional checks for any functions in PHP extensions, its better to give users proper error message than throw error 500 when they dont have required extension enabled.

    zip is optional, often enabled on shared hostings, but often excluded on a VPS set ups

Topic Closed

This topic has been closed to new replies.

About this Topic