How to setup PHP Pear in Mac OS X Lion

Here’s how to install PHP Pear in Mac OS X Lion 10.7 using the Apache/PHP install that comes with XCode.

Once you have PHP set up, you need to run the following installer:

[code lang=”php”]
kahwee-mba:Volumes kahwee$ sudo php /usr/lib/php/install-pear-nozlib.phar
Password:
[PEAR] Archive_Tar – installed: 1.3.7
[PEAR] Console_Getopt – installed: 1.3.0
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util – installed: 1.2.1
[PEAR] PEAR – installed: 1.9.2
Wrote PEAR system config file at: /private/etc/pear.conf
You may want to add: /usr/lib/php/pear to your php.ini include_path
[/code]

If your php.ini is in /etc/php.ini, open it using:

[code lang=”bash”]sudo nano /etc/php.ini[/code]

Should the file no exist, you may want to copy the configuration for /etc/php.ini.default over by doing the following:

[code lang=”bash”]sudo cp /etc/php.ini.default /etc/php.ini[/code]

Finally you will need to update the paths in your include_path in your php.ini:

[code lang=”php”]

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: “/path1:/path2”
include_path = “.:/php/includes:/usr/lib/php/pear”
…[/code]

After this, you can install PHP Pear packages. This is used if you want to install Numbers_Words package:

[code lang=”bash”]sudo pear install channel://pear.php.net/Numbers_Words-0.16.2[/code]

Have fun.

United States loses AAA credit rating from S&P

United States loses AAA credit rating.

United States loses AAA credit rating from S&P

The United States lost its top-notch AAA credit rating from Standard & Poor’s on Friday, in a dramatic reversal of fortune for the world’s largest economy.

S&P cut the long-term U.S. credit rating by one notch to AA-plus on concerns about growing budget deficits.

U.S. Treasuries, once undisputedly seen as the safest investment in the world, are now rated lower than bonds issued by countries such as the UK, Germany, France or Canada.

The outlook on the new U.S. credit rating is negative, S&P said in a statement, a sign that another downgrade is possible in the next 12 to 18 months. (Source: Reuters)

Not too surprising.