I'm new to PHP, but I need a CodeIgniter 4 project. I downloaded php 8.3.12 and added it to the environment variables (I'm using Windows 10). After that I installed composer with the setup-exe and here comes my problem.
Composer came with herd-lite, which has overriden my php configuration. Now when I type php --ini
I get:
Configuration File (php.ini) Path:
Loaded Configuration File: C:\Users\User\.config\herd-lite\bin\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
I explored that directory and there is nearly nothing except the php.ini and the php executable. However I need the php extensions as well, but with herd I don't get a single extension.
Any idea how can I make composer use my php directory instead of herd?
Finally I solved the problem. The solution was the following:
I noticed with where
that I have two environment variable for php
.
Composer added an additional path variable that pointed to herd's php
and it suppressed mine, because it was above in the Path
list. I changed the priority of that by going to Edit system environment variables > Environment variables... > User variables for User > Path > Edit... and here I selected my own php
variable and with Move up... I put it above herd's.