{"id":3389,"date":"2025-10-12T18:00:36","date_gmt":"2025-10-12T18:00:36","guid":{"rendered":"https:\/\/www.devopssupport.in\/blog\/?p=3389"},"modified":"2025-10-12T18:00:37","modified_gmt":"2025-10-12T18:00:37","slug":"php-extension-ext-intl-and-ext-gd-are-missing-composer-error-in-xampp","status":"publish","type":"post","link":"https:\/\/www.devopssupport.in\/blog\/php-extension-ext-intl-and-ext-gd-are-missing-composer-error-in-xampp\/","title":{"rendered":"\u201cPHP extension ext-intl and ext-gd are missing\u201d Composer Error in XAMPP"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>When working with Laravel or any PHP project using Composer, you might encounter an error like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Problem 1\n    - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension.\nProblem 2\n    - mpdf\/mpdf requires ext-gd * -&gt; it is missing from your system. Install or enable PHP's gd extension.\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>This error usually appears when you try to install or update packages such as <strong>mpdf\/mpdf<\/strong>, <strong>PhpSpreadsheet<\/strong>, or <strong>maatwebsite\/excel<\/strong> in your PHP project.<\/p>\n\n\n\n<p>Let\u2019s understand what causes this and how to fix it step by step.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f What Causes This Error?<\/h3>\n\n\n\n<p>The error occurs because your <strong>PHP environment doesn\u2019t have two required extensions enabled:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>intl (Internationalization extension)<\/strong> \u2014 used for localization, date\/time formatting, etc.<\/li>\n\n\n\n<li><strong>gd (Graphics Draw extension)<\/strong> \u2014 used for image processing and generating PDFs or Excel files.<\/li>\n<\/ol>\n\n\n\n<p>Even though these extensions are included with PHP by default, they are often <strong>disabled<\/strong> in the configuration file.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde9 Step-by-Step Solution<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 1: Open the php.ini File<\/strong><\/h4>\n\n\n\n<p>If you\u2019re using <strong>XAMPP<\/strong>, your <code>php.ini<\/code> file is located at:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\xampp\\php\\php.ini\n<\/code><\/pre>\n\n\n\n<p>You can open it using <strong>Notepad<\/strong>, <strong>VS Code<\/strong>, or any text editor.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 2: Enable the Required Extensions<\/strong><\/h4>\n\n\n\n<p>In the file, press <code>Ctrl + F<\/code> and search for:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>;extension=intl\n;extension=gd\n<\/code><\/pre>\n\n\n\n<p>You\u2019ll see both lines commented out with a semicolon (<code>;<\/code>).<\/p>\n\n\n\n<p>Remove the semicolon at the beginning of each line:<\/p>\n\n\n\n<p>\u2705 <strong>Before:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>;extension=intl\n;extension=gd\n<\/code><\/pre>\n\n\n\n<p>\u2705 <strong>After:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>extension=intl\nextension=gd\n<\/code><\/pre>\n\n\n\n<p>Save the file once you\u2019ve made the changes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 3: Restart Apache Server<\/strong><\/h4>\n\n\n\n<p>After saving, open your <strong>XAMPP Control Panel<\/strong> and restart <strong>Apache<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click <strong>Stop<\/strong> next to Apache<\/li>\n\n\n\n<li>Then click <strong>Start<\/strong> again<\/li>\n<\/ol>\n\n\n\n<p>This ensures the changes in <code>php.ini<\/code> take effect.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 4: Verify the Extensions<\/strong><\/h4>\n\n\n\n<p>Open <strong>Command Prompt<\/strong> or <strong>PowerShell<\/strong>, and type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -m\n<\/code><\/pre>\n\n\n\n<p>This command lists all enabled PHP extensions.<br>Make sure you can see both <code>intl<\/code> and <code>gd<\/code> in the list.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 5: Run Composer Again<\/strong><\/h4>\n\n\n\n<p>Now, go back to your project directory and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer install\n<\/code><\/pre>\n\n\n\n<p>If everything is set up correctly, Composer will install the required dependencies without any errors.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\uddf0 Optional: Temporary Workaround<\/h3>\n\n\n\n<p>If you\u2019re in a hurry and just want to bypass the check temporarily (not recommended), you can run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer install --ignore-platform-req=ext-intl --ignore-platform-req=ext-gd\n<\/code><\/pre>\n\n\n\n<p>However, this only skips the requirement\u2014it doesn\u2019t solve the underlying problem. Your project may not work properly if those extensions are truly needed.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 Final Thoughts<\/h3>\n\n\n\n<p>This issue is common among developers using <strong>XAMPP<\/strong> or <strong>WAMP<\/strong> for local PHP development.<br>The solution is simple: <strong>enable the missing extensions<\/strong> and <strong>restart your server<\/strong>.<\/p>\n\n\n\n<p>Once done, Composer will run smoothly, and your project will load all dependencies successfully.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with Laravel or any PHP project using Composer, you might encounter an error like this: This error usually appears when you try to install or&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[670,2847,2846,42,2844,2843,35,1343,2845,2848,60],"class_list":["post-3389","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-composer","tag-ext-gd","tag-ext-intl","tag-laravel","tag-maatwebsite-excel","tag-mpdf","tag-php","tag-php-extensions","tag-phpspreadsheet","tag-programming-errors","tag-xampp"],"_links":{"self":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/3389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/comments?post=3389"}],"version-history":[{"count":1,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/3389\/revisions"}],"predecessor-version":[{"id":3390,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/3389\/revisions\/3390"}],"wp:attachment":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/media?parent=3389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/categories?post=3389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/tags?post=3389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}