
- CONFIGURE APACHE FOR PHP 7 MAC HIGH SIERRA INSTALL
- CONFIGURE APACHE FOR PHP 7 MAC HIGH SIERRA PASSWORD
(It is not included with the phpMyAdmin distribution.)

CONFIGURE APACHE FOR PHP 7 MAC HIGH SIERRA PASSWORD
NOTE: You should change the 'auth_type' from 'config' to 'cookie' or 'httpd' so that you do not need to provide the password you selected for the MySQL root user in the 'password' option. Where ' ' is an empty password fill it with your MySQL root password. $cfg = '' // MySQL password (only needed with auth_type = 'config') You will need to add the following two lines immediately after it. It will be right at the beginning in the section labeled: "/* Authentication type */"Ĭhange the value from 'cookie' to 'config'. $cfg = 'cookie' // Authentication method (config, http or cookie based)? - default is Cookie. Next, Edit that file, and locate the line: This will create a file in the phpMyAdmin directory. $ ln -s /opt/local/www/phpmyadmin/doc/html/ phpmyadmin-docĪnd then accessing Finally, you need to set up the phpMyAdmin configuration to access MySQL. NOTE: This option expects "/opt/local/www/phpmyadmin/doc/html" to be accessible under "." This can be accomplished by phpsĪs a last check, reboot and verify that everything has autostarted and is running (i.e., repeat the above tests).Įdit the phpMyAdmin configuration file at /opt/local/A sample configuration file is installed at /opt/local/Consult the documentation on your server at "/opt/local/www/phpmyadmin/doc/html/config.html"

👉🏻 Get my newsletter for occasional updates. If you want to start MySQL automatically, run: brew services start mysqlĪny comments? Ping me on Twitter.
CONFIGURE APACHE FOR PHP 7 MAC HIGH SIERRA INSTALL
Once Homebrew is installed, installing MySQL is as simple as: brew install mysql

Instead of going for an installer package, we’ll use Homebrew. MySQL is not shipped with macOS, so we’ll have to install that manually.

To activate these settings you have to restart Apache: sudo apachectl restart MySQL You should also configure a few settings in /etc/php.ini: sudo tee -a /etc/php.ini << EOFĭate.timezone = "`sudo systemsetup -gettimezone | awk ''`" LoadModule php7_module libexec/apache2/libphp7.so So we’ll also add it to our config: sudo tee -a /etc/apache2/other/ $USER nf << EOF LoadModule rewrite_module libexec/apache2/mod_rewrite.so It seems that mod_rewrite no longer gets loaded by default, so we’ll also add that to our config: sudo tee -a /etc/apache2/other/ $USER nf << EOF Include /private/etc/apache2/extra/nfĪfter that, configure vhosts as necessary in /etc/apache2/extra/nf (don’t forget to remove the examples in there). If you want to use vhosts, you’ll also have to make sure that the vhosts config gets loaded: sudo tee -a /etc/apache2/other/ $USER nf << EOF Include /private/etc/apache2/users/*.conf Now we have to make sure that our user config above actually gets loaded: sudo tee -a /etc/apache2/other/ $USER nf << EOF Options Indexes MultiViews FollowSymLinks Then add a configuration for your user: sudo tee /etc/apache2/users/ $nf Apacheįirst, you have to create a web root in your user account: mkdir ~/Sites Apache, MySQL & PHP on macOS High Sierra Īpple macOS 10.13 ships with both a recent version of Apache (2.4.x), as well as PHP (7.1.x), so you’ll just have to install MySQL and go through a few steps to get everything up and running.
