05th Sep 2008
PHP and MySQL on a MAC computer
If you are a web developer or if you want to test some php files or whatever the reason is you want to run PHP on your MAC, all you need to do is to enable it.
Leopard version of MAC OS X comes with PHP 5 installed by default but it’s not enabled.
All you need to do to enable it, is to comment out the following line in /private/etc/apache2/httpd.conf
#LoadModule php5_module
Next, copy the /private/etc/php.ini.default to /private/etc/php.ini
If you want to use MySQL, just install the latest package available from the internet. But in order for php to know the location of the mysql socket, you must edit the php.ini.
Look for mysql.default_socket and make it look like this:
mysql.default_socket = /tmp/mysql.sock
create directory /var/mysql and set full permissions for everyone (777).
Next, if /etc/my.cnf doesn’t exist, create one copying it from /usr/local/mysql/support_files/my-small.cnf
That’s all. Now just restart the web sharing service (check off the box in the Sharing Preference pane and check it back on).
If you are a web developer or if you want to test some php files or whatever the reason is you want to run PHP on your MAC, all you need to do is to enable it.
Leopard version of MAC OS X comes with PHP 5 installed by default but it’s not enabled.
All you need to do to enable it, is to comment out the following line in /private/etc/apache2/httpd.conf
#LoadModule php5_module
Next, copy the /private/etc/php.ini.default to /private/etc/php.ini
If you want to use MySQL, just install the latest package available from the internet. But in order for php to know the location of the mysql socket, you must edit the php.ini.
Look for mysql.default_socket and make it look like this:
mysql.default_socket = /tmp/mysql.sock
create directory /var/mysql and set full permissions for everyone (777).
Next, if /etc/my.cnf doesn’t exist, create one copying it from /usr/local/mysql/support_files/my-small.cnf
That’s all. Now just restart the web sharing service (check off the box in the Sharing Preference pane and check it back on).
Posted by marian under
MAC
No Comments »