You can find the location for php.ini on Mac by calling php --ini
Below is the execution result on my Mac - actually I installed/upgraded php by homebrew
% php --ini Configuration File (php.ini) Path: /opt/homebrew/etc/php/8.2 Loaded Configuration File: /opt/homebrew/etc/php/8.2/php.ini Scan for additional .ini files in: /opt/homebrew/etc/php/8.2/conf.d Additional .ini files parsed: /opt/homebrew/etc/php/8.2/conf.d/ext-opcache.ini
Below is my php.ini settings
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" ; ; PHP's default setting for include_path is ".;/path/to/php/pear" ; https://php.net/include-path include_path = ".:/php/includes:/Users/ck/my_php_library"
To reload php.ini, you should run like below - my PHP version is 8.2 based on above for your information
brew services restart php@8.2