{"id":5047,"date":"2019-09-19T07:02:07","date_gmt":"2019-09-19T01:32:07","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=5047"},"modified":"2019-09-21T09:41:03","modified_gmt":"2019-09-21T04:11:03","slug":"php-fatal-error-class-ziparchive-not-found","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/php-fatal-error-class-ziparchive-not-found\/","title":{"rendered":"PHP Fatal error: Class &#8216;ZipArchive&#8217; not found"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">PHP Fatal error: Class &#8216;ZipArchive&#8217; not found<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Date: 19\/09\/2019<\/h4>\n\n\n\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PHP fatal error on &#8216;zip Archive&#8217; not found clearly shows that the&nbsp;<code>zip extension<\/code>&nbsp;has to be installed for&nbsp;<code>zipArchive<\/code>&nbsp;class to be present.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, the solution is to install the PHP zip extension on your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-php-zip-extension\">Install PHP Zip Extension<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If your webserver is on Linux, then you can install PHP Zip extension using the below command:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ubuntu-debian\">Ubuntu\/Debian:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install php-zip<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"redhat-centos\">Redhat\/CentOS:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo yum install php-zip<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you are having multiple versions of PHP and want to link Zip extension with a specific version of PHP, then below is the command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Based on the PHP version you have installed in the server, use the command line as version described 7.0, 7.1, 7.2, 7.3.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install php7.0-zip\nor\nsudo yum install php7.0-zip<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, restart the webserver.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restart-apache-nginx-web-server\">Restart Apache\/Nginx Web Server:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart nginx\nor\nsudo systemctl restart apache2\nor\n\/etc\/init.d\/nginx restart\nor\n\/etc\/init.d\/apache restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restart-php-fpm\">Restart PHP-FPM:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using PHP-FPM, then you need to restart this service also.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart php-fpm\nor\nsudo systemctl restart php-fpm\nor\n\/etc\/init.d\/php-fpm restart\nor\n\/etc\/init.d\/php-fpm restart<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it! everything will work fine by applying the above simple crack.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks for using&nbsp;<a href=\"https:\/\/pheonixsolutions.com\/\">pheonix solutions<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP Fatal error: Class &#8216;ZipArchive&#8217; not found Date: 19\/09\/2019 Introduction PHP fatal error on &#8216;zip Archive&#8217; not found clearly shows [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1020],"tags":[712],"class_list":["post-5047","post","type-post","status-publish","format-standard","hentry","category-containers-kubernetes","tag-class-ziparchive-not-found","psol-cat-containers-kubernetes"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1jp","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=5047"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5047\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}