luminescente

Leopard Tech Talk

Apple, Portugal — Pedro Cardoso on November 6, 2007 at 12:05 am

“Spend a day with Apple engineers and experts, and get all the latest details about the release of Mac OS X Leopard. Tech Talks feature in-depth presentations, demonstrations, and Q&A - live and in person. Attendence is free, but space is limited. Register today.”

Mais informação aqui.

Escrevo isto aqui apenas porque Lisboa também vai ter direito a conferência, a 3 de Dezembro. Quem diria?

Bora lá com umas faixas a dizer “QUEREMOS A APPLE A SÉRIO EM PORTUGAL”? :)

PHP 5 under Mac OS X 10.5 Leopard

Apple — Pedro Cardoso on November 5, 2007 at 3:18 pm

### Apache

This weekend I installed Leopard on my work laptop. As Marc Liyanage’s installer is not working at the moment, so I had to do it the hard way. Fortunately, PHP 5 is already included in 10.5, so it’s just a matter of configuring things. Apple’s PHP is pretty slim and does not include all the modules Marc’s version has, but is enough for me as I do not use anything out of the ordinary.

First, edit the file /etc/apache2/httpd.conf e uncomment the line

LoadModule php5_module libexec/apache2/libphp5.so

In /etc, copy php.ini.default to php.ini. Edit the newly created php.ini as you wish: I didn’t change anything at first. Restart Apache, and PHP should be working. Create a test phpinfo() file and run it.

### Pear

If you did the phpinfo thing, you should see it was compiled with the flag “–without-pear”. Not a good thing, as I need some Pear modules. Visit http://pear.php.net/go-pear and copy (Cmd-A, Cmd-C) all the source you see.

In a terminal window type the following (don’t select and copy from here, you’ll overwrite the Pear source installer you copied previously).

pbpaste | sudo php

pbpaste is a neat utility which pastes the clipboard (pasteboard?) contents into the shell. We’re piping this output into PHP running as a super-user.

Follow the onscreen prompts, accept the modification to php.ini. The only default I didn’t accept was the directory where Pear gets installed. I opted to /usr/pear. Maybe I should have used /usr/local/pear…

Pear should be working now. Try to

/usr/pear/bin/pear install

### MySQL

I also need MySQL, and fortunately the 10.4 installer from MySQL.com works fine.

MySQL itself runs, but not without issues: the provided startup item and the System Prefs module do not work. To start MySQL in the shell use

sudo /usr/local/mysql/bin/safe_mysqld

I just had to change the “default_socket” setting PHP uses. By default, PHP looks for the socket somewhere under /var/. Edit /etc/php.ini and change the line:

mysql.default_socket = /tmp/mysql.sock

Restart Apache once again and you are done!

« Previous Page
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | luminescente