How to install PHP APC in OS X

I assume you already have PEAR/PECL available. I am using the Mac OS X PHP environment that is provided by Apple’s XCode but it shouldn’t matter how you get your PHP. First you need to update your channels:

[code lang=”bash”]kahwee:~ kahwee$ sudo pear update-channels
Updating channel “doc.php.net”
Channel “doc.php.net” is up to date
Updating channel “pear.php.net”
Channel “pear.php.net” is up to date
Updating channel “pecl.php.net”
Channel “pecl.php.net” is up to date[/code]

Continue reading “How to install PHP APC in OS X”

Snow Leopard accidentally your data

Opps. If you’re on Snow Leopard, never log into your guest account. Logging into the guest account then back to your account can cause your account’s home directory to be deleted as though it is brand new. It is speculated that Apple’s Mac OS X 10.6 Snow Leopard deletes the user’s home directory instead of the guest’s directory.

Snow Leopard bug can delete account data

A bug has been reported in Apple’s new Snow Leopard version of OS X that can result in the loss of an entire user account’s data. The glitch seems to be triggered by using a Guest account and then trying to log back into a regular account.

According to multiple topics on the Apple Support discussion boards, the problem can occur when a user logs into their Mac’s Guest account — whether by accident or on purpose — and then tries to log back into their regular account.

In some cases, users have reported finding their regular account empty of data, as though it were a brand new account.

Speculation is that something makes Snow Leopard treat the regular account like a Guest account, from which by default all data is deleted upon logout. Further speculation is that the problem occurs when the Guest account was already enabled in Leopard before being upgraded to Snow Leopard. (Source: IT Wire)

This is really bad if it’s true. Apple has yet to confirm this.

The day my MacPorts died

I was all excited to receive a brown uninspiring envelop knowing what it should contain. My excitement lasted till I completed the installation of Mac OS X Snow Leopard only to discover MacPorts isn’t working. I had no idea how to fix that.

[code lang=”bash”]kahwee:~ kahwee$ sudo port help
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper
while executing
“load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib”
(“package ifneeded Pextlib 1.0” script)
invoked from within
“package require Pextlib 1.0”
(file “/opt/local/bin/port” line 40)[/code]

Above is some gibberish error. Hoping to fix it soon. Good thing is that my LAMP installed from MacPorts in Leopard is working still although the paths are a little messed up.