![]() In our example, x86 Chipset # Intel x86 Chipsetcode /usr/local/etc/php/7.4/php.ini Apple Silicon M1 Chipset # Apple Silicon M1 Chipsetcode /opt/homebrew/etc/php/7.4/php.ini Pecl install xdebug brew link -overwrite -force uninstall -r xdebugįor each version, you have installed update the php.ini. ![]() ![]() brew link -overwrite -force uninstall -r xdebug To install xdebug for each version of php (cli and fpm) run the following. Keep in mind you may need to reconfigure that version of PHP but I’ve found your php.ini files remain the same. When this happens you can reinstall the PHP version having the error. # brewīrew link -overwrite -force bash functionĪs time passes Homebrew is bound to break your PHP installations. If you want to change the default php CLI you can set it using brew or if added, the bash function phpv 7.4. You can add the following to your bash scripts, to make switching between multiple PHP versions on macOS simple: # Make switching versions easy php72 -v Switching Between Multiple PHP Versions For example, you can check the exact version of the aliased version of PHP. # Alias PHP versionsĪlias you reload your bash file, you can access each alias from the Mac command line. The path might be different if you are using an M1 chip. This will give you quick access to a specific version when needed. Next, and optionally, add some PHP CLI aliases by adding the following to the bash scripts within your. sudo lsof -i -n -P|grep php-fpm Alias multiple PHP versions sudo brew services start brew services start brew services start brew services start brew services start that you have processes running and validate your ports are correct. Once you are ready, start-up php-fpm for each version. Intel x86 Chipset # Intel x86 Chipset/usr/local/etc/php/7.2/php.ini /usr/local/etc/php/7.3/php.ini /usr/local/etc/php/7.4/php.ini /usr/local/etc/php/8.0/php.ini /usr/local/etc/php/8.1/php.ini Apple Silicon M1 Chipset # Apple Silicon M1 Chipset/opt/homebrew/etc/php/7.2/php.ini /opt/homebrew/etc/php/7.3/php.ini /opt/homebrew/etc/php/7.4/php.ini /opt/homebrew/etc/php/8.0/php.ini /opt/homebrew/etc/php/8.1/php.ini For example, you might want to increase the upload_max_filesize and post_max_size to 10M.Īgain, note the path based on the chipset. Optionally, before starting php-fpm, if you want to make edits to a php.ini file now is the time. For example, I use port 9074.Īlso, you will want php-fpm to run with your user account and not _Intel x86 Chipset # Intel x86 Chipsetcode /usr/local/etc/php/7.4/php-fpm.d/# default Change the ports of each php-fpm to match its php version number. brew unlink phpīrew link -overwrite -force for each version update the php-fpm you will need a unique port. brew tap shivammathur/phpīrew install install install install install set PHP 7.4 as your default php CLI version. postgres-# \du PHPĭon’t use the default homebrew core tap for PHP. Install postgresql (not the postgres app). Mysql> ALTER USER IDENTIFIED WITH mysql_native_password BY 'password' Postgres Next, MySQL 8 authentication needs to be updated per user to mysql_native_password. Now, secure using the password password and then restart. ![]() Sql_mode = "ONLY_FULL_GROUP_BY,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" Next, update your my.cnf code /usr/local/etc/my.cnf # Default Homebrew MySQL server config Now, that the tools are installed, you can get into the rest of the setup process. xcode-select -installĪlso, you will need VS Code installed with the code command in your system path.įinally, install Homebrew. We will be using the terminal a lot coming up (I like iTerm2). Next, install the CLI tools from the terminal. Install Redis: This is recommended if you are doing Laravel work.īefore starting you need a few tools installed to take the stress out of the setup process: Xcode, VS Code, and Homebrew.įirst, install Xcode.It catches emails and provides a nice looking UI to view them. Install MailHog: This tool is excellent that you will love if you send email during local development.Install Dnsmasq *: This step is required for those custom domains.Install Nginx *: This step is required and is super in-depth, so you get SSL/TLS certs and custom local domains.Install Xdebug: This is an awesome tool I highly recommend.Install PHP Versions *: This is the meat.Install PostgreSQL: This step is not required, but I personally use PostgreSQL, so its here.Install MySQL: This step is not required, but MySQL and PHP are like PB
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |