https://mariadb.com/kb/en/installing-mariadb-on-macos-using-homebrew/
mariadb --version
If after a Mac OS update MariaDB or MySQL stop working and you get this error on login:\
https://mariadb.com/kb/en/installing-mariadb-on-macos-using-homebrew/
mariadb --version
If after a Mac OS update MariaDB or MySQL stop working and you get this error on login:\
Related links:
Use var_dump() to echo a variable: https://www.php.net/manual/en/function.var-dump.php
The version of PHP available from the command line has nothing to do with the version of PHP loaded as a module. These are completely separate things. The version you see in browser when you run phpinfo()
is the version Apache is using and the version you see when you run which php
in cli is the version command line is using. If after upgrading to a new version of php typing php --version
in terminal still shows old version of php you need to update the php path of your $PATH variable which we do using .bash_profile. This is a hidden file in your Mac’s user directory which is loaded before Terminal loads your shell environment and contains all the startup configuration and preferences for your command line interface. Take note that Bash shell uses colon (:) as the path separator; while windows use semicolon (;).
AuthType Basic | |
AuthName "only for valid users" | |
AuthUserFile /full/path/.htpasswd | |
Require valid-user | |
// If you don't have ssh access to your site, put the following command in a php file and upload it to your server to find out the full path to .htpasswd: | |
<?php echo realpath('./') . PHP_EOL; ?> | |
// You can create a .htpasswd using terminal: | |
htpasswd -c .htpasswd username |