

- #Mac os x apache running but apachectl stop not working for mac os x#
- #Mac os x apache running but apachectl stop not working mac os#
- #Mac os x apache running but apachectl stop not working password#
The error 2002 means that MySQL can't connect to local database server through the socket file (e.g. No errors means you're done and PHP5 with MySQL should work fine.

sudo apachectl restartĬheck the logs if there are no error related to PHP5. Replace the /etc/php.ini file to reflect the socket file's name: fault_socket = /tmp/mysql.sock

You should change it to the value you have noted earlier - it was /tmp/mysql.sock in my case. The default of fault_socket is /var/mysql/mysql.sock. Open /etc/php.ini and look for fault_socket. There's another way (some say an easier way) to determine the location of the socket's file name by logging in to MySQL and running: show variables like '%socket%' Ĭonfiguring PHP5 with MySQL support - /etc/php.ini Note the socket: part - that's the socket file you should use in php.ini. Version: '5.5.27' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL) $ tail -1 /Users/jacek/apps/mysql/data/localhost.err tail -1 /Users/jacek/apps/mysql/data/localhost.err to find out the socket file's name - it should be the last line. Open the localhost.err file (again, yours might be named differently), i.e. 130309 12:17:59 mysqld_safe Logging to '/Users/jacek/apps/mysql/data/localhost.err'.ġ30309 12:17:59 mysqld_safe Starting mysqld daemon with databases from /Users/jacek/apps/mysql/data The file that comes after Logging to is important. Note the hostname in the file name - localhost in my case - that may be different for your configuration. bin/mysqld_safe) there should be debug lines printed out to the console that tell you where you can find the log files. Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch configured - resuming normal operations Make sure that /var/log/apache2/error_log contains a line that tells you the php5_module is enabled - you should see PHP/5.3.15 (or similar). Start Apache HTTP with sudo apachectl start (or restart if it's already started and needs to be restarted to re-read the configuration file). LoadModule php5_module libexec/apache2/libphp5.so
#Mac os x apache running but apachectl stop not working password#
Make sure the PHP5 support is enabled in /etc/apache2/nf.Įdit the file with sudo vi /etc/apache2/nf (enter the password when asked) and uncomment (remove from the beginning of) the line to load the php5_module module.
#Mac os x apache running but apachectl stop not working mac os#
The answer is based on excellent response, but since I had to google some specific changes to have it configured in my configuration, mostly Mac OS X-specific, I thought I'd add it here for the sake of completeness.
#Mac os x apache running but apachectl stop not working for mac os x#
This is for Mac OS X with the native installation of Apache HTTP and custom installation of MySQL.
