• Call Us: +92-333-7276335
  • - Mail Us: info@shekztech.com

Plot 1177, Sector 31B - Crossing, Karachi, Sindh

Loading...
Guide to Compile PHP with AVIF Support on AlmaLinux
  • Views: 238
  • Category: WHM
  • Published at: 21 Nov, 2023
  • Updated at: 21 Nov, 2023

Guide to Compile PHP with AVIF Support on AlmaLinux

Step 1: Install Development Tools and Libraries

  • Log into Server: Access your server as the root user via SSH (if you are using the GoDaddy VPS, have the WHM installed and root access).
  • Update System: Execute sudo yum update to update system packages.
  • Install Development Tools: Use sudo yum group install "Development Tools" to install necessary compilers and tools.

Step 2: Install libavif

Install EPEL Repository

sudo yum install epel-release

Install libavif: Execute

sudo yum install libavif-devel

Step 3: Download and Extract PHP Source from php.net

Download PHP Source

wget http://www.php.net/distributions/php-8.1.0.tar.gz

Extract PHP

tar -xvf php-8.1.0.tar.gz

Step 4: Now You Need to Compile PHP

Navigate to PHP Directory:

cd php-8.1.0

Prepare Build Environment:

./buildconf --force

Configure Build

/configure --enable-gd --with-avif

Compile PHP:

make

Install PHP

make install

 

Step 5: Verify AVIF Support

Check PHP Version:

 php -v

Check AVIF Support:

php -i | grep AVIF

Step 6: Restart the Web Server or the VPS/Dedicated Server

Restart Server: If using Apache, 

 systemctl restart httpd

Important Notes

  • This guide is essential. Your specific server or the OS may require additional adjustments.
  • Always back up your server before starting this/every process.
  • If you encounter issues, contact your hosting provider.

This process upgrades your server's PHP version to support the newer AVIF image format version, which enhances its capabilities and performance.

Shehzad Ahmed

Shehzad Ahmed is a highly qualified expert with a Master of Philosophy in Computer Science and a decade of extensive industry experience. With his impressive track record in web development and computer science, he has not only left an indelible mark on the industry but also made substantial contributions to education. Since , he has created more than eighty exhaustive courses, paving the way for innumerable individuals interested in learning and development. His unparalleled knowledge and innate ability to elucidate complex ideas make him a highly sought-after educator and consultant. Choose Shehzad and take advantage of his exceptional balance of technical expertise and teaching prowess to propel your learning journey or project to new heights.

0 Comment(s)
Write your comment