WordPress.org

Ready to get started?Download WordPress

Forums

PHP ZIP functionality on all servers? (4 posts)

  1. Leo Blanchette
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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