Apache, PHP and MongoDB on Mac OS X 10.6 Snow Leopard

MongoDB (from “humongous”) is a scalable, high-performance, open source, schema-free, document-oriented database.

There’s a lot of buzz brewing about it, so I wanted to give it a try with PHP on my development Mac. The following is how I went about installing Apache, PHP and MongoDB on Snow Leopard. You must have installed the Xcode developer tools (found on the Snow Leopard install DVD) and MacPorts for this to all work.

(more…)

2010-01-02 [, , , , , , ] 4 Comments

Applescript to shutdown in 15 seconds

set userCancelled to false

try
    set answer to display dialog "Backup complete. Shutting down in 15 seconds." giving up after 15
on error number -128
    set userCancelled to true
end try

if userCancelled then

else if gave up of answer then
    tell application "Finder"
        shut down
    end tell
end if
2009-05-28 [, , ] No Comments

Install pecl_http for PHP

You will probably want to ensure that curl supports https before getting underway:

curl -V

Check that the output contains https:

>: curl -V
curl 7.19.2 (i386-apple-darwin9.5.0) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3
Protocols: tftp ftp telnet dict http file https ftps 
Features: Largefile NTLM SSL libz

If it doesn’t:

sudo port deactivate curl
sudo port install curl +ssl

Once you have curl with https support:

sudo pecl install pecl_http

If you followed my previous howto, you’ll want to move the module to the location specified in your php.ini file:

sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20060613/http.so /opt/local/lib/php/extensions

Restart lighttpd and then you’ll be good to go.

2008-11-24 [, , , , , , , ] No Comments