title: PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found in
body: <p>I've been struggling with installing zip extension over PHP for a while now.
  I keep getting an error message while trying to use ZipArchive: </p>
  
  <blockquote>
    <p>PHP Fatal error:  Uncaught Error: Class 'ZipArchive' not found in '...'</p>
  </blockquote>
  
  <p>The result of: <code>php -m</code></p>
  
  <pre><code>[PHP Modules]
  calendar
  Core
  ctype
  date
  dom
  exif
  fileinfo`
  filter
  ftp
  gd
  gettext
  hash
  iconv
  json
  libxml
  mbstring
  openssl
  pcntl
  pcre
  PDO
  Phar
  posix
  readline
  Reflection
  session
  shmop
  SimpleXML
  sockets
  SPL
  standard
  sysvmsg
  sysvsem
  sysvshm
  tokenizer
  wddx
  xml
  xmlreader
  xmlwriter
  xsl
  Zend OPcache
  zip
  zlib
  
  [Zend Modules]
  Zend OPcache
  </code></pre>
  
  <p>Result of <code>sudo pecl list</code>:</p>
  
  <pre><code>Installed packages, channel pecl.php.net:
  =========================================
  Package Version State
  xdebug  2.5.5   stable
  zip     1.15.2  stable
  </code></pre>
  
  <p>Also, phpinfo produced this result:
  <a href="https://i.stack.imgur.com/nXqx3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nXqx3.png" alt="enter image description here"></a></p>
  
  <p>It looks like zip is installed correctly.</p>
  
  <p>Is there anything else I'm missing?</p>
  
  <p>Thanks.</p>