{"id":38136,"date":"2024-09-14T16:00:56","date_gmt":"2024-09-14T15:00:56","guid":{"rendered":"https:\/\/airoserver.com\/?p=38136"},"modified":"2024-09-16T07:00:39","modified_gmt":"2024-09-16T06:00:39","slug":"php-zip-in-cpanel","status":"publish","type":"post","link":"https:\/\/airoserver.com\/fr\/airoserver\/php-zip-in-cpanel\/","title":{"rendered":"PHP Zip in cPanel"},"content":{"rendered":"<h2><strong>PHP Zip in cPanel<\/strong><\/h2>\n<p>PHP websites that use zip files need the PHP zip extension to process the data. To enable PHP Zip in cPanel, website owners can follow a few simple steps.<\/p>\n<h4><strong>Why do we need a PHP zip extension?<\/strong><\/h4>\n<p>Website owners are always looking for ways to optimize website files. Compression is one of the ways to reduce file size.<\/p>\n<p>The zip archive file format supports lossless data compression, making it suitable for sending and storing data.<\/p>\n<p>Websites that use the compressed file format need the zip extension to process it. The zip extension allows users to read and write compressed files.<\/p>\n<h4><strong>How to enable PHP extension in cPanel?<\/strong><\/h4>\n<p>1.First, we enter cPanel and click on the PHP PEAR packages\u00a0 in the SOFTWARE section. The icon will appear as shown.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38140\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1.png\" alt=\"php zip in cPanel\" width=\"4279\" height=\"1832\" srcset=\"https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1.png 4279w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1-300x128.png 300w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1-1024x438.png 1024w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1-768x329.png 768w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1-1536x658.png 1536w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1-2048x877.png 2048w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-3-1-18x8.png 18w\" sizes=\"auto, (max-width: 4279px) 100vw, 4279px\" \/>2.Then we type zip in the search bar and Archive_Zip will be available. Here, we click on the install icon.<\/p>\n<p>3.After installing Archive_Zip, go to the previous step and click on the Select PHP Version icon.<\/p>\n<p>4.Now, Archive_Zip can be seen here. Click the zip plugin checkbox and hit the save button to add Archive_Zip to the current PHP version. This will install the PHP Zip extension.<\/p>\n<h4><strong>How to enable PHP extension in WHM?<\/strong><\/h4>\n<p>Zip plugin is a very basic requirement for websites today. So we enable it on all the servers we manage. Let&#8217;s see how to enable it through WHM.<\/p>\n<p>First, we enter WHM and move as follows:<\/p>\n<p><strong>Software &gt;&gt; EasyApache 4 &gt;&gt; Customize &gt;&gt; PHP extensions<\/strong><\/p>\n<p>Here we search for zip and enable phpx.x-php-zip for all versions. Finally, we click on Review and Provision.<\/p>\n<p>This plugin enables zip for all PHP websites on the server.<\/p>\n<p>Common errors when enabling the PHP Zip extension<\/p>\n<p>Now, let&#8217;s see some common errors reported when enabling a PHP extension:<\/p>\n<ol>\n<li><strong> The library is missing.<\/strong><\/li>\n<\/ol>\n<p>Common errors:<\/p>\n<p>PHP ZipArchive Library is missing or disabled<\/p>\n<p>You can check this using the following command:<\/p>\n<p>php -v<\/p>\n<p>He is using CentOS 6 with Apache and PHP 7.0. PHP 7 provides a php7.0-zip package. We installed it using the command:<\/p>\n<p>yum install php7.0-zip<\/p>\n<p>We use the following command to check the libraries:<\/p>\n<p>yum list installed | grep -i php<\/p>\n<p>Finally, we ran the following command to restart Apache.<\/p>\n<p>service httpd restart<\/p>\n<p>Finally, this error will be fixed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38139\" src=\"https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-2-2.jpg\" alt=\"php zip in cPanel\" width=\"1024\" height=\"550\" srcset=\"https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-2-2.jpg 1024w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-2-2-300x161.jpg 300w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-2-2-768x413.jpg 768w, https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-2-2-18x10.jpg 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<ol start=\"2\">\n<li><strong> Installation command error<\/strong><\/li>\n<\/ol>\n<p>PHP extensions can also be enabled via commands. Therefore, few users try to install it through the commands themselves. But mistakes in the command lead to errors.<\/p>\n<p>Here is an example where the user got an error due to an incorrect command.<\/p>\n<p>Got a ZipExtension class not found error. He is using CentOS 7 and PHP 7.0.27.<\/p>\n<p>yum install php70-php-pecl-zip<\/p>\n<p>The actual package was php-pecl-zip.x86_64. So we install it using the command:<\/p>\n<p>Install yum php70-php-pecl-zip.x86_64.<\/p>\n<p>And then we activate it by executing the command:<\/p>\n<p>echo \u201cextension=zip.so\u201d &gt;&gt; \/etc\/php.d\/zip.ini<\/p>\n<p>This error is fixed and the PHP extension is enabled.<\/p>","protected":false},"excerpt":{"rendered":"<p>PHP Zip in cPanel PHP websites that use zip files need the PHP zip extension to process the data. To enable PHP Zip in cPanel, website owners can follow a few simple steps. Why do we need a PHP zip extension? Website owners are always looking for ways to optimize website files. Compression is one [&hellip;]<\/p>","protected":false},"author":26,"featured_media":38192,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[179,1],"tags":[],"class_list":["post-38136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-airoserver","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Zip in cPanel - Airoserver | Cloud Hosting Solutions<\/title>\n<meta name=\"description\" content=\"Enable PHP Zip in cPanel to compress files easily. Follow this simple guide for web developers and admins.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/airoserver.com\/fr\/airoserver\/php-zip-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Zip in cPanel - Airoserver | Cloud Hosting Solutions\" \/>\n<meta property=\"og:description\" content=\"Enable PHP Zip in cPanel to compress files easily. Follow this simple guide for web developers and admins.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/airoserver.com\/fr\/airoserver\/php-zip-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Airoserver | Cloud Hosting Solutions\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-14T15:00:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-16T06:00:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-1-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Codinoob\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Codinoob\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/\"},\"author\":{\"name\":\"Codinoob\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97\"},\"headline\":\"PHP Zip in cPanel\",\"datePublished\":\"2024-09-14T15:00:56+00:00\",\"dateModified\":\"2024-09-16T06:00:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/\"},\"wordCount\":503,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/airoserver.com\/#organization\"},\"articleSection\":[\"AiroServer\",\"Blog\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/\",\"url\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/\",\"name\":\"PHP Zip in cPanel - Airoserver | Cloud Hosting Solutions\",\"isPartOf\":{\"@id\":\"https:\/\/airoserver.com\/#website\"},\"datePublished\":\"2024-09-14T15:00:56+00:00\",\"dateModified\":\"2024-09-16T06:00:39+00:00\",\"description\":\"Enable PHP Zip in cPanel to compress files easily. Follow this simple guide for web developers and admins.\",\"breadcrumb\":{\"@id\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/airoserver.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Zip in cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/airoserver.com\/#website\",\"url\":\"https:\/\/airoserver.com\/\",\"name\":\"Airoserver | Cloud Hosting Solutions\",\"description\":\"Cloud server | Dedicated server | Domain | Hosting| SSL | Virtual server | Airoserver\",\"publisher\":{\"@id\":\"https:\/\/airoserver.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/airoserver.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/airoserver.com\/#organization\",\"name\":\"Airoserver | Cloud Hosting Solutions\",\"url\":\"https:\/\/airoserver.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png\",\"contentUrl\":\"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png\",\"width\":925,\"height\":880,\"caption\":\"Airoserver | Cloud Hosting Solutions\"},\"image\":{\"@id\":\"https:\/\/airoserver.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97\",\"name\":\"Codinoob\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/airoserver.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g\",\"caption\":\"Codinoob\"},\"sameAs\":[\"http:\/\/codinoob.ir\"],\"url\":\"https:\/\/airoserver.com\/fr\/author\/codinoob\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Zip in cPanel - Airoserver | Cloud Hosting Solutions","description":"Enable PHP Zip in cPanel to compress files easily. Follow this simple guide for web developers and admins.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/airoserver.com\/fr\/airoserver\/php-zip-in-cpanel\/","og_locale":"fr_FR","og_type":"article","og_title":"PHP Zip in cPanel - Airoserver | Cloud Hosting Solutions","og_description":"Enable PHP Zip in cPanel to compress files easily. Follow this simple guide for web developers and admins.","og_url":"https:\/\/airoserver.com\/fr\/airoserver\/php-zip-in-cpanel\/","og_site_name":"Airoserver | Cloud Hosting Solutions","article_published_time":"2024-09-14T15:00:56+00:00","article_modified_time":"2024-09-16T06:00:39+00:00","og_image":[{"width":1024,"height":550,"url":"https:\/\/airoserver.com\/wp-content\/uploads\/2024\/09\/Airoserver-article-1-2.jpg","type":"image\/jpeg"}],"author":"Codinoob","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Codinoob","Dur\u00e9e de lecture estim\u00e9e":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#article","isPartOf":{"@id":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/"},"author":{"name":"Codinoob","@id":"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97"},"headline":"PHP Zip in cPanel","datePublished":"2024-09-14T15:00:56+00:00","dateModified":"2024-09-16T06:00:39+00:00","mainEntityOfPage":{"@id":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/"},"wordCount":503,"commentCount":0,"publisher":{"@id":"https:\/\/airoserver.com\/#organization"},"articleSection":["AiroServer","Blog"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/","url":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/","name":"PHP Zip in cPanel - Airoserver | Cloud Hosting Solutions","isPartOf":{"@id":"https:\/\/airoserver.com\/#website"},"datePublished":"2024-09-14T15:00:56+00:00","dateModified":"2024-09-16T06:00:39+00:00","description":"Enable PHP Zip in cPanel to compress files easily. Follow this simple guide for web developers and admins.","breadcrumb":{"@id":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/airoserver.com\/airoserver\/php-zip-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/airoserver.com\/"},{"@type":"ListItem","position":2,"name":"PHP Zip in cPanel"}]},{"@type":"WebSite","@id":"https:\/\/airoserver.com\/#website","url":"https:\/\/airoserver.com\/","name":"Airoserver | Cloud Hosting Solutions","description":"Cloud server | Dedicated server | Domain | Hosting| SSL | Virtual server | Airoserver","publisher":{"@id":"https:\/\/airoserver.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/airoserver.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/airoserver.com\/#organization","name":"Airoserver | Cloud Hosting Solutions","url":"https:\/\/airoserver.com\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/airoserver.com\/#\/schema\/logo\/image\/","url":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png","contentUrl":"https:\/\/airoserver.com\/wp-content\/uploads\/2023\/09\/logo_airoserver.png","width":925,"height":880,"caption":"Airoserver | Cloud Hosting Solutions"},"image":{"@id":"https:\/\/airoserver.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/airoserver.com\/#\/schema\/person\/98c9f3c9d2d2baaf929d2c4a53462e97","name":"Codinoob","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/airoserver.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/016ea0daadd857a2718a67b0e8afc43ac449be1b2c2945db2414893811a00a97?s=96&d=mm&r=g","caption":"Codinoob"},"sameAs":["http:\/\/codinoob.ir"],"url":"https:\/\/airoserver.com\/fr\/author\/codinoob\/"}]}},"_links":{"self":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/posts\/38136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/comments?post=38136"}],"version-history":[{"count":0,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/posts\/38136\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/media\/38192"}],"wp:attachment":[{"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/media?parent=38136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/categories?post=38136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airoserver.com\/fr\/wp-json\/wp\/v2\/tags?post=38136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}