I have tried to install codeigniter4. So, I will try to install Codeigniter4 in my system to apply this command.
composer create-project codeigniter4/appstarter project-root
After running this command, I will get this error:
Could not find package codeigniter4/appstarter with stability stable in a version installable using your PHP version 7.1.31.
How can I fix that?
I know many developers have faced this problem, I also got success to follow these steps:
You have to upgrade your XAMPP PHP version to install Codeigniter 4. Codeigniter 4 required a minimum of 7.2 PHP versions.
1. Download PHP binary from here | Choose anyone, which is supported to your system https://windows.php.net/download
2. Created a backup of xampp/php folder.
3. Extract all the contents of zip file to xampp/php folder.
4. Copied php.ini (as I have modified it before and I want my configuration back if you were using the default one then skip this step.)
5. Open this file C:\xampp\apache\conf\extra\http-xampp.conf
Replace
LoadFile "C:/xampp/php/php5ts.dll" LoadFile "C:/xampp/php/libpq.dll" LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"
To
LoadFile "C:/xampp/php/php7ts.dll" LoadFile "C:/xampp/php/libpq.dll" LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"
Next Restart Apache and run the command again in your drive.