![]() ![]() Update User and Group where your_username is the name of your User in macOS and Group will be "staff." User your_username ![]() LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so LoadModule rewrite_module lib/httpd/modules/mod_rewrite.soĪdd the following entry at the end of the LoadModules section. LoadModule userdir_module lib/httpd/modules/mod_userdir.so LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so LoadModule ssl_module lib/httpd/modules/mod_ssl.so LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so vi /usr/local/etc/httpd/nfįind Listen 8080 and change the port to 80: Listen 80 Now that we have PHP successfully installed, we still need to tell Apache to use it. The php.ini file can be found in: /usr/local/etc/php/8.x/php.ini. □ Tip: Remember useful Apache 'brew services' commands. $ tail -f /usr/local/var/log/httpd/error_log □ Tip: You can monitor the Apache error log in a new Terminal tab/window to see if anything is invalid or causing a problem. ![]() Set Apache to start now and restart at login. $ brew install httpdĬheck the installation path. We will update it to run on standard ports (80/443) shortly. Now, let's brew and configure our new Apache version. □ Tip: macOS automatically adds the compass icon to your folder. Type the following command into your terminal to create a new folder in your user's root directory. $ sudo launchctl unload /System/Library/LaunchDaemons/ 2>/dev/null However, we don't want Apple to control our web server so let's stop it and prevent it from starting on boot. MacOS 13.0 Ventura comes with Apache 2.4 pre-installed. Otherwise, please follow instructions to fix any potential issues. If the installation is successful, the output will be: Your system is ready to brew. Let's see if everything is working the way it should. Homebrew can self-diagnose and check your system for potential problems. Homebrew installs the stuff you need that Apple (or your Linux system) didn’t let's install it. Homebrew is an excellent package manager for macOS. This document helps get your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, and MariaDB.īefore we get started, if you haven't already installed XCode Command Line Tools on your system, let's do that. pecl uninstall redisįinally you should test and upgrade your projects for PHP 8 compatibility.MacOS Ventura 13.0 Setup: Homebrew + Apache + PHP + MariaDB The second thing you can do, if you're updating from an older PHP version which also used pecl to install extension is to reinstall every extension individually. Note that if you're testing installed extensions via the CLI, you don't need to restart nginx, apache or Valet when making changes to ini settings. Now check the ini file: extension= "redis.so" zend_extension= "xdebug.so" opt/homebrew/etc/php/8.1/conf.d/php-memory-limits.ini opt/homebrew/etc/php/8.1/conf.d/ext-opcache.ini, ini files parsed: /opt/homebrew/etc/php/8.1/conf.d/error_log.ini, ini files in: /opt/homebrew/etc/php/8.1/conf.dĪdditional. Loaded Configuration File: /opt/homebrew/etc/php/8.1/php.ini You can run php -ini to know which file is loaded: Configuration File (php.ini) Path: /opt/homebrew/etc/php/8.1 If extensions aren't properly loaded, there are two easy fixes.įirst, make sure the extensions are added in the correct ini file. Make sure all extensions are correctly installed and loaded by checking both your PHP webserver and CLI installs: php -i | grep redis var_dump( extension_loaded( 'redis')) Make sure to restart your web server after installing new packages: sudo nginx -s reload sudo apachectl restart valet restart # Matched packages, channel : # = # Package Stable/(Latest) Local # pdflib 4.1.4 (stable) Creating PDF on the fly with the PDFlib library You can search for other extensions using pecl search: pecl search pdf # Installed packages, channel : # = # Package Version State # redis 5.3.4 stable # xdebug 3.1.1 stable You can run pecl list to see which extensions are installed: pecl list They can be installed like so: pecl install redis ![]() You can use valet use to switch between PHP versions: valet use use # Extensions If you're using Laravel Valet, you should do the following steps to upgrade it: composer global update On Twitter or subscribe to my newsletter: If you want to stay up to date about what's happening on this blog, you can follow me Noticed a tpyo? You can submit a PR to fix it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |