Skip to content
Menu
DevSecOps Now!!!
  • About
  • Certifications
  • Contact
  • Courses
  • DevSecOps Consulting
  • DevSecOps Tools
  • Training
  • Tutorials
DevSecOps Now!!!

Fixing WebP Format Is Not Supported by PHP Installation in XAMPP (Ubuntu 24) – Complete Step-by-Step Guide

Posted on February 25, 2026

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

If you are running a Laravel project like Eventmie on XAMPP (LAMPP) in Ubuntu 24 and suddenly see this error:

Webp format is not supported by PHP installation.

You are not alone.

This issue happens frequently when:

  • GD extension is enabled
  • But WebP support inside GD is not compiled
  • Or you are mixing system PHP and XAMPP PHP
  • Or Ubuntu version mismatch causes confusion
  • Or iconv compilation fails during rebuild

In this guide, I will explain everything in simple and practical terms:

  • Why this happens
  • How to check which PHP is actually running
  • Why GD shows enabled but WebP is missing
  • Why installing php8.3-gd does not fix XAMPP
  • How to compile PHP with WebP support properly
  • Why iconv throws “does not support errno”
  • How to safely undo everything
  • When to stop server-level fixing and move to code-level solution

This tutorial is based on a real production debugging scenario.


1. Understanding the Root Problem

The core error:

Webp format is not supported by PHP installation.

This comes from Intervention Image library (used by Eventmie).

Internally it tries:

$image->encode('webp', 90);

If your PHP GD does not support WebP, it throws:

Intervention\Image\Exception\NotSupportedException

Now the most confusing part:

You check GD and it says enabled.

But WebP Support is blank.

Example:

/opt/lampp/bin/php -r 'print_r(gd_info());'

Output:

[GD Version] => bundled (2.1.0 compatible)
[WebP Support] =>

Blank means:
WebP was NOT compiled inside GD.


2. First Important Question: Which PHP Is Actually Running?

This is critical.

Run:

which php
type -a php
php -v

If you see:

/opt/lampp/bin/php

Then you are using XAMPP PHP.

If you see:

/usr/bin/php

Then you are using system PHP.

Installing:

sudo apt install php8.3-gd

will NOT affect XAMPP PHP.

Because XAMPP is completely independent.

This is one of the biggest misconceptions.


3. Why Installing php8.3-gd Did Not Fix the Problem

You installed:

sudo apt install php8.3-gd

But your PHP version was:

PHP 8.2.12 (cli)

And it was coming from:

/opt/lampp/bin/php

That means:

System PHP 8.3 ≠ XAMPP PHP 8.2

So installing system packages does nothing for LAMPP.

This is where many developers get stuck.


4. How to Check If GD WebP Is Really Enabled

Run these three commands:

/opt/lampp/bin/php -m | grep -i gd
/opt/lampp/bin/php -r 'print_r(gd_info());'
/opt/lampp/bin/php -r 'var_dump(function_exists("imagewebp"));'

If you get:

bool(false)

Then WebP support is not compiled.

Even if configure command shows:

--with-webp

That does NOT guarantee WebP actually compiled successfully.


5. Why Ubuntu 24 Is Not the Real Problem

You asked:

Is Ubuntu 24 creating problem?

Answer:
No.

Ubuntu 24 supports PHP 8.3 officially.

But you are using:

XAMPP PHP 8.2

XAMPP bundles its own PHP binary and libraries.

Ubuntu version is irrelevant unless:

  • Required development libraries are missing
  • Or you are compiling PHP manually

So Ubuntu is not the root cause.


6. Can We Recompile XAMPP PHP With GD WebP?

Yes.

But it is advanced and risky.

You attempted:

  • Download PHP 8.2.12 source
  • Configure with –with-webp
  • Build
  • Install

And initially WebP was still false.

Later, after proper configuration, you got:

bool(true)
[WebP Support] => 1

That means compilation succeeded.

But then iconv error appeared.


7. The iconv Error: “iconv does not support errno”

During configure, you saw:

checking if iconv supports errno... no
configure: error: iconv does not support errno

This happens because:

  • glibc iconv behaves differently
  • PHP configure expects certain behavior
  • Ubuntu 24 environment sometimes fails that test

Solutions usually involve:

  • Forcing cache variable
  • Installing GNU libiconv manually
  • Exporting CPPFLAGS and LDFLAGS

But this increases complexity significantly.

For production XAMPP server, recompiling PHP inside LAMPP is not beginner-friendly.


8. The Biggest Mistake Developers Make

Trying to “fix server” when application-level fallback is easier.

In your case:

Imagick was already working.

Test confirmed:

$im=new Imagick();
$im->setImageFormat("webp");

It successfully created WebP file.

But Eventmie was using GD driver, not Imagick.

So the real fix could be:

Change Intervention driver to Imagick.

Instead of rebuilding entire PHP stack.


9. Safe Undo – How to Revert Everything

If things get messy:

Delete test install:

sudo rm -rf /opt/lampp-webp-test

Delete source builds:

sudo rm -rf /usr/local/src/php-8.2.12

Clear environment variables:

unset PKG_CONFIG_PATH CPPFLAGS LDFLAGS LD_LIBRARY_PATH
hash -r

Restart XAMPP:

sudo /opt/lampp/lampp restart

Now you are back to original state.


10. The Smart Production Approach (Recommended)

Instead of rebuilding PHP:

Use one of these:

Option 1: Force Imagick Driver

In config/image.php:

'driver' => 'imagick',

Option 2: Fallback Logic

Wrap WebP encoding:

if (function_exists('imagewebp')) {
    $image->encode('webp', 90);
} else {
    $image->encode('jpg', 90);
}

This avoids server-level risk.


11. Final Decision Guide

If you are:

Beginner → Do NOT recompile PHP
Production server → Avoid manual rebuild
Using XAMPP → Never mix system PHP packages
Already have Imagick → Use Imagick driver
Need WebP strictly via GD → Compile carefully in isolated environment

Post Views: 5,992
Subscribe
Login
Notify of
guest
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
  • Incorrect definition of table mysql.column_stats
  • Mautic and PHP 8.3 Compatibility Guide (2026)
  • Certified AIOps Engineer: The Complete Career Path and Certification Guide
  • How to Rename Apache Virtual Host Files Safely (Step-by-Step Guide for Linux)
  • AIOps Foundation Certification: Everything You Need to Know to Get Certified
  • DevOps to Certified Site Reliability Professional: A Senior Mentor’s Guide
  • Certified Site Reliability Manager Training, Preparation, and Career Mapping
  • Certified Site Reliability Architect: The Complete Career Guide
  • What Is a VPN? A Complete Beginner-to-Advanced Tutorial
  • How to Install, Secure, and Tune MySQL 8.4 on Ubuntu 24.04 for Apache Event MPM and PHP-FPM
  • Complete Guide to Certified Site Reliability Engineer Career
  • Certified DevSecOps Professional Step by Step
  • Certified DevSecOps Manager: Complete Career Guide
  • Certified DevSecOps Engineer: Skills, Career Path and Certification Guide
  • Step-by-Step: Become a Certified DevSecOps Architect
  • Tuning PHP 8.3 for Apache Event MPM and PHP-FPM on Ubuntu: A Complete Step-by-Step Production Guide
  • Complete Step-by-Step Guide to Configure Apache Event MPM, Create index.php, Set Up VirtualHost, and Fix Ubuntu Default Page
  • Convert XAMPP Apache to Event MPM + System PHP-FPM
  • The Gateway to System Observability Engineering (MOE)
  • How to Finetune Apache and Prove It Works: A Real-World Guide to Testing Performance, Concurrency, HTTP/2, Memory, CPU, and Security
  • Building a High-Performance Apache Event MPM + PHP-FPM + MariaDB Stack (Advanced Server Optimization Guide)
  • Master Infrastructure as Code: The Complete Hashicorp Terraform Associate Guide
  • Building a High-Performance Apache Server with Event MPM + PHP-FPM (Step-by-Step Guide)
  • Is XAMPP Safer for Production Than Using Apache and PHP as Root? 2026 Practical Guide
  • Unlock Cloud Security Expertise with Certified Kubernetes Security Specialist (CKS)
  • How to Fix wpDiscuz Not Replacing Default WordPress Comments in Block Themes
  • Complete Guide to Certified Kubernetes Application Developer Certification
  • Overview of Certified Kubernetes Administrator (CKA) Certification
  • How to Install and Configure XAMPP on Ubuntu 24 Server (Latest Version – 2026 Complete Guide)
  • Mastering the Google Cloud Professional DevOps Engineer

Recent Comments

  1. digital banking on Complete Tutorial: Setting Up Laravel Telescope Correctly (Windows + XAMPP + Custom Domain)
  2. SAHIL DHINGRA on How to Uninstall Xampp from your machine when it is not visible in Control panel programs & Feature ?
  3. Abhishek on MySQL: List of Comprehensive List of approach to secure MySQL servers.
  4. Kristina on Best practices to followed in .httacess to avoid DDOS attack?
  5. Roshan Jha on Git all Commands

Archives

  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022

Categories

  • Ai
  • AI Blogging
  • AiOps
  • ajax
  • Android Studio
  • Antimalware
  • Antivirus
  • Apache
  • Api
  • API Security
  • Api Testing
  • APK
  • Aws
  • Bike Rental Services
  • ChatGPT
  • Code Linting
  • Composer
  • cPanel
  • Cyber Threat Intelligence
  • Cybersecurity
  • Data Loss Prevention
  • Database
  • dataops
  • Deception Technology
  • DeepSeek
  • Devops
  • DevSecOps
  • DevTools
  • Digital Asset Management
  • Digital Certificates
  • Docker
  • Drupal
  • emulator
  • Encryption Tools
  • Endpoint Security Tools
  • Error
  • facebook
  • Firewalls
  • Flutter
  • git
  • GITHUB
  • Google Antigravity
  • Google play console
  • Google reCAPTCHA
  • Gradle
  • Guest posting
  • health and fitness
  • IDE
  • Identity and Access Management
  • Incident Response
  • Instagram
  • Intrusion Detection and Prevention Systems
  • jobs
  • Joomla
  • Keycloak
  • Laravel
  • Law News
  • Lawyer Discussion
  • Legal Advice
  • Linkedin
  • Linkedin Api
  • Linux
  • Livewire
  • Mautic
  • Medical Tourism
  • MlOps
  • MobaXterm
  • Mobile Device Management
  • Multi-Factor Authentication
  • MySql
  • Network Traffic Analysis tools
  • Paytm
  • Penetration Testing
  • php
  • PHPMyAdmin
  • Pinterest Api
  • Quora
  • SAST
  • SecOps
  • Secure File Transfer Protocol
  • Security Analytics Tools
  • Security Auditing Tools
  • Security Information and Event Management
  • Seo
  • Server Management Tools
  • Single Sign-On
  • Site Reliability Engineering
  • soft 404
  • software
  • SuiteCRM
  • SysOps
  • Threat Model
  • Twitter
  • Twitter Api
  • ubuntu
  • Uncategorized
  • Virtual Host
  • Virtual Private Networks
  • VPNs
  • Vulnerability Assessment Tools
  • Web Application Firewalls
  • Windows Processor
  • Wordpress
  • WSL (Windows Subsystem for Linux)
  • X.com
  • Xampp
  • Youtube
©2026 DevSecOps Now!!! | WordPress Theme: EcoCoded
wpDiscuz