Cara update php 8 di xampp

Cara update php 8 di xampp

Upgrade PHP Version 7 to 8 in Xampp: Here we have the latest version in PHP with many updates and improvements. Many web developers, especially beginners, have a common question “How to update PHP version in XAMPP?”. After getting a lot of queries on the topic, we decided to write a short and simple tutorial on how you can easily update the PHP versions in Windows XAMPP.

It is not very complex but sometimes very essential when we need the latest version of PHP for a new project without changing the current local server settings. So, I am trying to cover changing the version by keeping the old version manually.

Latest Version of PHP in 2021

Now we have the PHP 8.0.2 version and more latest versions will be on the way. And PHP 8 has many features as given below.

  • PHP 8.0 is a major update of the PHP language.
  • It contains many new features and optimizations including named arguments, union types, attributes, constructor property promotion, match expression, null safe operator, JIT.
  • PHP 8 has improvements in the type system, error handling, and consistency.
  • PHP 8.0 improves speed and compiling.

Cara update php 8 di xampp

Now, I am going to tell you How to Upgrade PHP Version 7 to 8 in Xampp

Step1: Download PHP 8.0.2 Version from its official website. click to download PHP 8.0.2.  You need to download Thread safe version.

Cara update php 8 di xampp

after download the PHP latest version. you need to create a new folder named “php” and extract the downloaded zip inside the PHP folder you recently created.

Step 2: Go to your XAMPP installation directory ( C:\xampp\php ) and rename your old PHP directory with an old version prefix like PHP to PHP_old or PHP_7_4. Now copy & paste the extracted new PHP folder here. You can see this in the given image below. I have changed my PHP folder name to php7.2. and the PHP folder is the latest version.

Step 3: After the rename of the old php folder to php7.2 or something else. Now you need to move the new “php” to xampp directory.

Cara update php 8 di xampp

Step4: Next, open httpd-xampp.conf from the XAMPP dashboard configuration panel. as you can see in the given below image.

Cara update php 8 di xampp
Upgrade PHP Version 7 to 8 in Xampp

On the PHP-Module setup section, comment these two lines and add the two lines below

#
# PHP-Module setup
#
LoadFile “/xampp/php/php8ts.dll”
LoadFile “/xampp/php/libpq.dll”
LoadModule php_module “/xampp/php/php8apache2_4.dll”
LoadFile “C:/xampp/php/libsqlite3.dll”

Cara update php 8 di xampp

That’s it. Now restart your XAMPP server and keep coding. Now you can check your php version via using the php_info() function or you can also use the command: php -v

Summary for Upgrade PHP Version 7 to 8 in Xampp

May in some cases you will face an error or issue. so, I recommend you restart your system once and check it again. if the error is still there or Xampp apache is not running so, you have 2 scenarios.

  1. Your PHP new version does not download or extracted correctly. or you have downloaded the wrong zip file.
  2. you did a mistake in the editing of httpd-xampp.conf file.

Also, Read Top Programming Languages and the Best way to earn online.

 9,462 total views,  1 views today

Learn PHP online

2nd March 2021 in PHP, Web Development, xampp

Hey Guys! I am a web developer and digital market expert. I loved to share my views and knowledge with everyone. This is my dream blog "LearnPHPonline.in". I want to share my whole knowledge and experience with everyone.

Bagaimana Cara Update PHP?

Download dulu PHP8 nya di https://windows.php.net/download..
Jika sudah berhasil silahkan ekstrak zip tersebut..
Copy folder hasil ekstrak ke folder utama xampp , kalau di saya di C:/xampp..
Matikan dahulu service Apache di XAMPP nya..
Folder php di folder xampp ubah nama nya menjadi php-7 ..

Bagaimana Cara Update xampp?

Ada enam langkah untuk memperbarui XAMPP:.
Backup file website kamu..
Export database kamu..
Uninstall versi XAMPP yang lama..
Menginstal versi terbaru dari XAMPP..
Menyesuaikan pengaturan PHP..
Me-restore file website dan database kamu..

Cara Mengetahui PHP versi berapa?

Caranya ketik domainanda.com/phpinfo. php. Anda akan melihat versi PHP yang digunakan pada website.

Cara Melihat xampp versi berapa?

Cara cek versi PHP di Xampp.
Simpan (save as) dengan nama (versi.php) di direktori htdocs (Xampp). Biasanya secara default direktori ada di C:\xampp\htdocs. ... .
Buka browser..
Ketik : localhost/versi.php..
Jika sesuai, informasi versi Php akan muncul seperti dibawah ini..