Monday, March 25, 2019

Config for OSX Mojave 10.14

After upgrade to OSX Mojave 10.14
- php is upgraded to 7
- apache is working, but website is not working
- php is not working
- mysql is not working
- phpmyadmin is not working


Solution:

1) copy old config to /etc/apache2/httpd.conf
- enable php
- add alias
- add directory

2) update php config
- create php.ini
cp /etc/php.ini.default /etc/php.ini
- enable session.save_path

3) install mysql 5.7 (only 5.7 or above support Mojave)
- remove old config
mv /etc/my.cnf /etc/my.cnf.old
- create /etc/my.cnf
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION
- restart mysql and test
select @@sql_mode;
- remove duplicate icon in system preference

4) download mysqladmin 4.8.5
- create config.inc.php from config.sample.inc.php
- update $cfg['blowfish_secret']
- update $cfg['Servers'][$i]['host'] = 'localhost' to '127.0.0.1'
- add folder ./tmp with owner & group _www

5) update php code for 7