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
Chris R&D
Monday, March 25, 2019
Wednesday, May 28, 2014
Config for OSX Mavericks 10.9
After upgrade to OSX Mavericks:
- apache is not running
- php is not working
- phpMyAdmin is not working
1) update /etc/apache2/httpd.conf
2) create /etc/php.ini
3) restart apache
- apache is not running
- php is not working
- phpMyAdmin is not working
1) update /etc/apache2/httpd.conf
2) create /etc/php.ini
3) restart apache
Monday, January 13, 2014
MySQL Command Line
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart
Config MySQL (my.cnf) for OSX Mountain Lion
Mac load default MySQL setting, so there is no my.cnf file. To customize MySQL config:
1) Create you own my.cnf
sudo cp /usr/local/mysql/support-files/my-huge.cnf /etc/my.cnf
2) Update my.cnf
3) Restart MySQL
sudo /usr/local/mysql/support-files/mysql.server restart
1) Create you own my.cnf
sudo cp /usr/local/mysql/support-files/my-huge.cnf /etc/my.cnf
2) Update my.cnf
3) Restart MySQL
sudo /usr/local/mysql/support-files/mysql.server restart
Thursday, January 2, 2014
Add Virtual Host for OSX Mountain Lion
Update /etc/apache2/httpd.conf
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "website_root"
ServerName server_name
</VirtualHost>
<Directory "website_root">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "website_root"
ServerName server_name
</VirtualHost>
<Directory "website_root">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Update /etc/hosts
127.0.0.1 server_name
127.0.0.1 server_name
Enable pdo_mysql for OSX Mountain Lion
Update /etc/php.ini
extension=php_pdo_mysql.dll
pdo_mysql.default_socket=/tmp/mysql.sock
extension=php_pdo_mysql.dll
pdo_mysql.default_socket=/tmp/mysql.sock
Tuesday, April 30, 2013
Enable Apache for OSX Mountain Lion
To enable
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
To disable
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
To disable
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Subscribe to:
Posts (Atom)