Home > Article > Development Tools > Regarding the php version problem in composer install
The following tutorial column of composer will introduce to you the solution to the PHP version problem that occurs in composer install. I hope it will be helpful to friends in need!
problem: When executing composer install or composer update, the error message is that your PHP version number is too low and does not meet its version requirements, and when you use wamp to switch It still doesn't work after reaching the appropriate version number.
ps:
1) If your php version does not meet the requirements, you can download a php package and install it in the G:\wamp64\bin\php directory.
2) Find php.ini phpForApache.ini wampserver.conf in your previous php folder and copy it to your new php folder.
3) Modify the information in php.ini and phpForApache.ini as follows
extension_dir ="G:/wamp64/bin/php/php7.1.9/ext/" The path is the one you need Path, generally only the version number needs to be modified.
4) Modify the information in wampserver.conf as follows (change 5 to an appropriate number. For example, if you are currently using php7.1.9 version, change 5 to 7, which is the first number of the version number.)
Original:
$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module'; $phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll';
changed to:
$phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module'; $phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll';
5) Restart wamp
answer: Although you changed the wamp version, your composer is installing The version selected has not changed. You need to reinstall composer again.
composer download address: https://getcomposer.org/download/. After entering the page, click as shown in the picture.
During the installation process, the place shown in the picture will appear. Click Browse to modify your php version. At this time, you can execute composer install or composer update When, the php version used is the one you set.
For more composer technical articles, please visit the composer column!
The above is the detailed content of Regarding the php version problem in composer install. For more information, please follow other related articles on the PHP Chinese website!