<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7045224794957698395</id><updated>2024-10-03T19:07:44.988+08:00</updated><category term="OSX"/><category term="Aptana"/><category term="CakePHP"/><category term="PHP"/><category term="10.5"/><category term="MySQL"/><category term="MAMP"/><category term="Server"/><category term="bake"/><category term="Apache"/><category term="todo"/><category term="AMP"/><category term="Admin"/><category term="CodeIgniter"/><category term="IDE"/><category term="Lion"/><category term="PDT"/><category term="RoR"/><category term="Ruby"/><category term="yii"/><category term="Blog"/><category term="BootCamp"/><category term="CRUD"/><category term="EXT2"/><category term="EXT3"/><category term="Eclipse"/><category term="FireFox"/><category term="Framework"/><category term="Git"/><category term="Google"/><category term="JDT"/><category term="Leopard"/><category term="Linux"/><category term="Mac"/><category term="MongoDB"/><category term="OnyX"/><category term="PHPUnit"/><category term="Plugin"/><category term="Processing"/><category term="RSS"/><category term="Rail"/><category term="Rails"/><category term="Sparks"/><category term="Toolbar"/><category term="VMware Fusion"/><category term="Win 7"/><category term="Xcode"/><category term="ampps"/><category term="library"/><category term="pear"/><category term="rockmongo"/><category term="root"/><title type='text'>OSX in Life</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-2279083162333206478</id><published>2012-07-27T07:21:00.001+08:00</published><updated>2012-07-27T07:21:42.201+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><category scheme="http://www.blogger.com/atom/ns#" term="Lion"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Xcode"/><title type='text'>Lion 系統下使用 Xcode 安裝 Git</title><summary type="text">Google 提供 Git 的安裝程式（http://code.google.com/p/git-osx-installer/），安裝的位置是在 /usr/local/bin/git 檔案夾之下，因此可能無法直接從終端機取用。

要將 Git 安裝在 Lion 系統的 /usr/bin ，可以透過 AppStore 下載免費的 Xcode ，然後從&amp;nbsp;Preference&amp;nbsp;&amp;gt; Download 面板下選 Components 標籤，安裝“Command Line Tools”，就會下載 Git 並安裝於&amp;nbsp;/usr/bin 。


</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/2279083162333206478/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2012/07/lion-xcode-git.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/2279083162333206478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/2279083162333206478'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2012/07/lion-xcode-git.html' title='Lion 系統下使用 Xcode 安裝 Git'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEjTV6PfgvPuFK83bNSPdUHMQMKoOTyHWJxaUkkLyPIIVv0gtpmSqUbPgbdrVtK1fh45GqRVGCic6bmhS1LdPjMZb-EQg0MW1WfFJiwIEBefclQiJLiGKfh-l3uG5wVKJDnsGR6aqZ-DP1/s72-c/screenshot_29.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-6872698904995964974</id><published>2012-05-21T18:09:00.000+08:00</published><updated>2012-05-21T18:23:29.317+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ampps"/><category scheme="http://www.blogger.com/atom/ns#" term="Apache"/><category scheme="http://www.blogger.com/atom/ns#" term="CodeIgniter"/><category scheme="http://www.blogger.com/atom/ns#" term="MongoDB"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="rockmongo"/><title type='text'>Ampps 一次在OSX上安裝230種OpenSource 開源碼軟體</title><summary type="text">因為MAMP 2.0.5雖然可以無法順利安裝MongoDB，但一直無法順利登入RockMongo，搜尋之下，發現Ampps這個OSX用的APH(Apache+PHP+MySQL)套件，可以一次安裝230種開源碼的APH軟體，更內建MongoDB跟RockMongo，還有CodeIgniter，jQuery等PHP與javascript套件，對於OSX的網站開發者來說，真是方便的選擇。</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/6872698904995964974/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2012/05/ampps-230opensource.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/6872698904995964974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/6872698904995964974'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2012/05/ampps-230opensource.html' title='Ampps 一次在OSX上安裝230種OpenSource 開源碼軟體'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-4904215298296647712</id><published>2012-05-13T17:48:00.000+08:00</published><updated>2012-05-13T17:48:07.342+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeIgniter"/><category scheme="http://www.blogger.com/atom/ns#" term="MAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Sparks"/><title type='text'>MAMP安裝 CodeIgniter+Sparks</title><summary type="text">

由終端機換到CodeIgniter安裝目錄，這裡名稱為 CodeIgniter_2 
cd /Applications/MAMP/htdocs/CodeIgniter_2
執行MAMP的PHP指令
/Applications/MAMP/bin/php/php5.3.6/bin/php -r &quot;$(curl -fsSL http://getsparks.org/go-sparks)&quot;
終端機顯示下載Sparks的訊息：
Pulling down spark manager from http://getsparks.org/static/install/spark-manager-0.0.9.zip ...
Pulling down Loader class core extension from http://getsparks.org/static/install/</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/4904215298296647712/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2012/05/mamp-codeignitersparks.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/4904215298296647712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/4904215298296647712'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2012/05/mamp-codeignitersparks.html' title='MAMP安裝 CodeIgniter+Sparks'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-5541239705231977224</id><published>2012-03-31T22:48:00.002+08:00</published><updated>2012-03-31T22:48:45.898+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EXT2"/><category scheme="http://www.blogger.com/atom/ns#" term="EXT3"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Lion"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><title type='text'>OSX Lion 裝載 ext2/ext3 格式磁碟</title><summary type="text">根據這篇：
http://techiezone.rottigni.net/2012/01/ext2ext3-support-on-mac-os-x-lion/

安裝 OSXFUSE :
http://osxfuse.github.com/

安裝時，要勾選最後一項 MacFUSE相容層 。</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/5541239705231977224/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2012/03/osx-lion-ext2ext3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/5541239705231977224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/5541239705231977224'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2012/03/osx-lion-ext2ext3.html' title='OSX Lion 裝載 ext2/ext3 格式磁碟'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-7881934317948686955</id><published>2012-01-08T16:30:00.001+08:00</published><updated>2013-10-13T22:32:46.941+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="JDT"/><category scheme="http://www.blogger.com/atom/ns#" term="Processing"/><title type='text'>Aptana 安裝 JDT 跟 Processing</title><summary type="text">根據：

https://aptanastudio.tenderapp.com/discussions/problems/2426-aptana-and-ant&amp;nbsp;
http://code.google.com/p/proclipsing/wiki/GettingStarted 
http://processing.org/tutorials/eclipse/

安裝 JDT

Help 選單選 Install New Software...&amp;nbsp;
按 Add 鈕，加入 http://download.eclipse.org/releases/helios/&amp;nbsp;http://download.eclipse.org/releases/indigo (Aptana 3.4 為 Eclipse indigo)
Work with 選&amp;nbsp;http://</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/7881934317948686955/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2012/01/aptana-jdt-processing.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7881934317948686955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7881934317948686955'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2012/01/aptana-jdt-processing.html' title='Aptana 安裝 JDT 跟 Processing'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-6421265459335245908</id><published>2011-12-25T08:59:00.001+08:00</published><updated>2011-12-25T09:40:08.069+08:00</updated><title type='text'>PHPUnit 與 Selenium 整合</title><summary type="text">PHPUnit 與 selenium 整合，必須先用 pear 下載 phpunit/PHPUnit_Selenium 套件，否則無法連動。


切換到MAMP 2.0的/bin/php/php5.3.6/bin檔案夾，用pear下載 phpunit/PHPUnit_Selenium ：
cd /Applications/MAMP/bin/php/php5.3.6/bin
sudo ./pear install phpunit/PHPUnit_Selenium
Password:

輸入管理員密碼後，會自動安裝好 phpunit/PHPUnit_Selenium 套件：
downloading PHPUnit_Selenium-1.1.3.tgz ...
Starting to download PHPUnit_Selenium-1.1.3.tgz (17,425 bytes)
....</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/6421265459335245908/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2011/12/phpunit-selenium.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/6421265459335245908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/6421265459335245908'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2011/12/phpunit-selenium.html' title='PHPUnit 與 Selenium 整合'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-1751237391854983156</id><published>2011-12-24T21:27:00.003+08:00</published><updated>2011-12-24T21:28:22.494+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="library"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="yii"/><title type='text'>Aptana + Yii 外加PHP Library</title><summary type="text">參考：PHP Development</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/1751237391854983156/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2011/12/aptana-yii-php-library.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1751237391854983156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1751237391854983156'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2011/12/aptana-yii-php-library.html' title='Aptana + Yii 外加PHP Library'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-5272953741279789325</id><published>2011-12-24T21:25:00.002+08:00</published><updated>2011-12-24T21:25:57.895+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="MAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><title type='text'>Aptana + MAMP 自定伺服器</title><summary type="text">參考：Setting up an external web server to preview PHP and other non-HTML pages</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/5272953741279789325/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2011/12/aptana-mamp.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/5272953741279789325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/5272953741279789325'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2011/12/aptana-mamp.html' title='Aptana + MAMP 自定伺服器'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-4133154381817513772</id><published>2011-09-05T11:28:00.001+08:00</published><updated>2011-09-05T11:28:07.080+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="RSS"/><title type='text'>RSS測試</title><summary type="text">RSS測試</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/4133154381817513772/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2011/09/rss.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/4133154381817513772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/4133154381817513772'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2011/09/rss.html' title='RSS測試'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-9213726927262237381</id><published>2011-08-27T22:51:00.005+08:00</published><updated>2011-08-28T08:16:16.146+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="yii"/><title type='text'>Yii-1</title><summary type="text">前往MAMP網頁根目錄：
cd /Applications/MAMP/htdocs
執行yiic腳本，產生 demo 網頁應用程式(不要用 sudo)：
./yii//framework/yiic webapp demo
Password:
Create a Web application under &#39;/Applications/MAMP/htdocs/demo&#39;? [Yes|No] y
測試 demo :
http://localhost/demo/index.php
執行 yiic shell , 要指定 config 檔案路徑：
./protected/yiic shell ./protected/config/main.php 
產生 message 控制器與&amp;nbsp;helloWorld 函數：
&amp;gt;&amp;gt; controller message </summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/9213726927262237381/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2011/08/yii-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/9213726927262237381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/9213726927262237381'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2011/08/yii-1.html' title='Yii-1'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-4998546696108058293</id><published>2011-08-22T22:29:00.022+08:00</published><updated>2011-08-28T22:49:48.255+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="pear"/><category scheme="http://www.blogger.com/atom/ns#" term="PHPUnit"/><title type='text'>MAMP 2.0 透過 pear 安裝 PHPUnit</title><summary type="text">根據這一篇的說明：http://ericlbarnes.com/blog/post/php_pear_phpunit_mamp
刪除 MAMP 2.0.x 錯誤的設定檔：
sudo rm /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf
前往MAMP的PEAR腳本檔案夾：
MAMP 1.9.x:
cd /Applications/MAMP/bin/php5.3/bin/
MAMP 2.0.x: 
cd /Applications/MAMP/bin/php/php5.3.6/bin/

更新MAMP的PEAR：
sudo ./pear channel-update pear.php.net
sudo ./pear upgrade pear
檢查PEAR版本：
./pear -V
PEAR Version: 1.9.4
</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/4998546696108058293/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2011/08/mamp-20-pear-phpunit.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/4998546696108058293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/4998546696108058293'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2011/08/mamp-20-pear-phpunit.html' title='MAMP 2.0 透過 pear 安裝 PHPUnit'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-8860113123275722540</id><published>2010-11-14T11:36:00.002+08:00</published><updated>2010-11-14T11:37:56.512+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FireFox"/><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Toolbar"/><title type='text'>MBA升級10.6.5，FireFox的GoogleToolbar失靈！？</title><summary type="text">MBA 2009 升級到OSX 10.6.6 唯一的災情！FireFox的Google Toolbar的按鈕全部消失！？重裝也無效！（之前也發生過，原因不明！？）

解決方法：
移除 FilreFox的附加元件：Google Toolbar for FlreFox
 移除 /使用者/你的名稱/資源庫/Application Support/Firefox/Profiles/ 路徑下的：&quot;GoogleToolbarData&quot; 檔案夾
重新安裝 Google Toolbar for FlreFox 附加元件。
</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/8860113123275722540/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2010/11/firefoxgoogletoolbar.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/8860113123275722540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/8860113123275722540'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2010/11/firefoxgoogletoolbar.html' title='MBA升級10.6.5，FireFox的GoogleToolbar失靈！？'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-7014010901817741434</id><published>2010-10-23T17:15:00.000+08:00</published><updated>2010-10-23T17:15:29.453+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BootCamp"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware Fusion"/><category scheme="http://www.blogger.com/atom/ns#" term="Win 7"/><title type='text'>BootCamp 3+Win 7+VMware Fusion 3=無網路設備問題解決</title><summary type="text">在MacBook Air上安裝Win 7+BootCamp 3.1+VMware Fusion 3.1，確發現Win 7無法上網，檢查Win 7的裝置管理員，會發現裡面的Ethernet出現驚歎號，重新安裝VMware Fusion Tools，裝置管理員還是找不到驅動程式。

解決方式透過Google找到這篇：
http://www.askdavetaylor.com/how_to_enable_ethernet_wifi_access_vmware_mac_windows_7.html
確發現無法找到這個檔案：
/Users/你的使用者ID/Documents/Virtual Machines/虛擬機名稱.vmx

原來VMware Fusion 3的設置檔案改了位置，放在：
/Users/你的使用者ID/Library/Application Support/VMware </summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/7014010901817741434/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2010/10/bootcamp-3win-7vmware-fusion-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7014010901817741434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7014010901817741434'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2010/10/bootcamp-3win-7vmware-fusion-3.html' title='BootCamp 3+Win 7+VMware Fusion 3=無網路設備問題解決'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-8178798475122488243</id><published>2010-02-22T22:16:00.079+08:00</published><updated>2010-08-03T23:40:16.404+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="RoR"/><title type='text'>CakePHP教學 on OSX(七)Blog練習：(2)Blog資料庫設計</title><summary type="text">RoRy框架中有一個&quot;資料遷移(mirgate)&quot;物件，可以用Ruby語法透過自動地在資料庫中產生對應的資料庫架構(schema)，學習上的好處是可以省去花在資料庫設計與結構查詢語言(SQL)上的功夫，只要專心熟悉Ruby語法即可。

而CakePHP則是相反地，是透過讀取一個既有的(通常是MySQL)資料庫架構，來產生相對的資料模型、控制器與視圖程式碼。因此預先設計並建立好一個資料庫，對於應用CakePHP框架來說非常重要，也比較符合PHP開發者原有的習慣。

Blog資料庫
首先應用之前“Todo”練習建立資料庫的方法，透過phpMyAdmin建立一個“blog”資料庫，以及同名的使用者“blog”並設定權限與密碼。

Blog資料表設計
跟之前“Todo”練習的資料庫只有一個資料表不同，Blog的資料必須分別使用多個資料表來儲存，並透過資料庫的關連功能來取得相關的資料。

第一個是</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/8178798475122488243/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2010/02/cakephp-on-osxblog2blog.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/8178798475122488243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/8178798475122488243'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2010/02/cakephp-on-osxblog2blog.html' title='CakePHP教學 on OSX(七)Blog練習：(2)Blog資料庫設計'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-3201991245731308052</id><published>2010-02-17T17:05:00.034+08:00</published><updated>2010-08-03T23:38:01.497+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bake"/><category scheme="http://www.blogger.com/atom/ns#" term="Blog"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><title type='text'>CakePHP教學 on OSX(七)Blog練習：(1)命名習慣</title><summary type="text">CakePHP沿襲RoR的觀念，使用“慣例優於組態(Convention over Configuration)”的“設計典範(Design Paradigm)”。因此不論是程式檔案與功能函式的名稱、放置程式檔案的目錄名稱與路徑、或是資料庫表格的名稱與欄位的設計，都有一定的命名慣例。

依循慣例設計程式的好處，一方面可以讓CakePHP這種程式框架可以自動地產生相關的程式樣板以加速程式的開發的速度；另一方面也方便開發者閱讀與理解程式與函式之間的關聯性，方便程式的管理與維護。唯一的缺點，就是要注意英文名詞的單複數問題，避免使用程式框架已經使用到的關鍵字詞，同時要不小心迷失在一堆複雜的檔案路徑之中。

“類大檔小”與“模單表複”慣例
CakePHP是採用物件導向的程式編寫範式，因此每個程式檔案就是一個“類別(class)”。程式語法中，類別的名稱用“駝峰式命名法”，每個詞的第一個字母大寫，</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/3201991245731308052/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2010/02/cakephp-on-osxblog1.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/3201991245731308052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/3201991245731308052'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2010/02/cakephp-on-osxblog1.html' title='CakePHP教學 on OSX(七)Blog練習：(1)命名習慣'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-1458557439092795418</id><published>2009-12-23T23:37:00.008+08:00</published><updated>2010-02-22T21:51:57.402+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="bake"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="CRUD"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="todo"/><title type='text'>CakePHP教學 on OSX(六)Todo應用程式練習：(3)應用程式測試 Taste “todo” cake!</title><summary type="text">CakePHP的bake all腳本可以根據資料表的架構(schema)，一次產生CRUD所需的程式碼。如果你按照幾篇的動作已經用bake all將items資料表的程式產生，就可以在瀏覽器輸入 http://localhost/todo/items 這個網址來測試。如果要在Aptana裡測試，請按照這一篇的方法，用“Run As &amp;gt; PHP Web Page”執行todo專案下的index.php叫出Aptana的內建瀏覽器，然後在輸入 http://localhost/todo/items 這個網址來測試。

CakePHP遵循MVC的軟體架構，語言的編寫方式是採用物件導向(Object-Oriented Programming)。所謂的“物件導向”是用“物件”來類比一個“獨立的程式”。一個“物件”有自己的“屬性(properties)”跟“行為(behaviors)”，例如</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/1458557439092795418/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx8-taste-todo-cake.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1458557439092795418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1458557439092795418'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx8-taste-todo-cake.html' title='CakePHP教學 on OSX(六)Todo應用程式練習：(3)應用程式測試 Taste “todo” cake!'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie9pt8sy3dbvKa7DM9tb2wKUdovt-numMDwMgYGczgNFkx7qtW4TVPbuTVwEiJWZ17LBcW3gTmxCk8GVysoszdxG1ItgNycrI-aOjL-B3AMqSVzqXeb6QYt7q4Oinj_g_vc9PIo180H2oj/s72-c/todotest_01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-537195918546954198</id><published>2009-12-22T22:50:00.015+08:00</published><updated>2010-02-22T21:51:34.048+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="bake"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="todo"/><title type='text'>CakePHP教學 on OSX(六)Todo應用程式練習：(2)自動產生程式碼 Bake All 一次烤熟！</title><summary type="text">雖然翻了幾本CakePHP跟RoR的書，但都還沒有全部看完。不過就我目前的了解，兩者建立資料庫的方式有點不同。RoR可以透過建立migrate檔案，記錄歷次資料庫架構(schema)設計上的改變，作為版本遷移的依據。RoR並且可以透過migrate檔案，產生不同的資料庫系統建立資料表所需的SQL程式碼，並自動產生資料庫檔案。這樣一來讓RoR的開發與資料庫的設計，不會遷就特定的資料庫系統而必須大幅修改程式碼。就這點來說，RoR可說是非常先進的設計。

CakePHP卻是要先用phpMyAdmin或其他的工具，在資料庫系統中先構建出完整的資料庫檔案，然後才能透過schema腳本從既有的資料庫備份出SQL檔案，作為資料庫架構的記錄與遷移的依據。或是先用SQL語言寫好資料庫的架構，再透過schema腳本將資料庫製作出來。方法上也許沒有RoR先進，但是我想一般的PHP開發者，應該都很熟悉這樣的開發</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/537195918546954198/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx7-bake-all.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/537195918546954198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/537195918546954198'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx7-bake-all.html' title='CakePHP教學 on OSX(六)Todo應用程式練習：(2)自動產生程式碼 Bake All 一次烤熟！'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1u2zUOaTu77V5L17an7fE8eR3OCouDd9xx-hArdAHGuODztQxXAvEaSQRW69WEubYbBLtA4x9OCOU1j6TBVvc38nVsbGZi2ng6SfRma_qfvvvqcvWMirtjDawnfwsKq43KY1pcw9ZJfMx/s72-c/phpmysql_01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-2893684100639598858</id><published>2009-12-22T19:49:00.013+08:00</published><updated>2010-02-23T00:02:06.985+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="bake"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="todo"/><title type='text'>CakePHP教學 on OSX(六)Todo應用程式練習：(1)烤出應用程式 &quot;Todo&quot; a First Cake!</title><summary type="text">這篇是根據“Beginning CakePHP: From Novice to Professional”這一本書的第一個“Todo”範例加以修改，不過不過與書中範例不同的是，這裡要用bake腳本自動產生程式碼，並嘗試跟MAMP的伺服器作結合。

看過幾本CakePHP的書，包括官網上面的範例，都是直接把程式檔案放在跟 cake 核心檔案夾同一層的 app 檔案夾裡，然後按照M/C/V的方式把model, controller 跟 view 的相關檔案放在 app 底下特定的檔案夾裡，像是這樣：

但是如此一來，如果要分開作幾個不同的練習，或是分別開發幾個網站的話，不同的應用程式的程式碼，都會分散在 app 檔案夾裡的不同檔案夾裡給全混在一起分不開了。如果從頭到尾只寫一個應用是沒問題，但剛開始學CakePHP時，想分開寫第二個應用練習時就慘了。如果針對每個練習的檔案夾裡都複製一份cake</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/2893684100639598858/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx6-todo-first-cake.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/2893684100639598858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/2893684100639598858'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx6-todo-first-cake.html' title='CakePHP教學 on OSX(六)Todo應用程式練習：(1)烤出應用程式 &quot;Todo&quot; a First Cake!'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjENuobn-uxVgnqE-Lt9hIRemJr-wutzjNDvKXemQ5qq60Ybg7I9zYxetvpmshsAPqQtlf68DU1Z0Av6ahYCPUkqimvQjbqduybzU7BRNQsswF71jBDDlRIo42oOWDBp6GOcEzn_vrd1vZq/s72-c/todo_00.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-7006949004103750935</id><published>2009-12-22T09:57:00.009+08:00</published><updated>2010-02-17T15:17:29.112+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="MAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="PDT"/><category scheme="http://www.blogger.com/atom/ns#" term="RoR"/><title type='text'>CakePHP教學 on OSX(五)開發環境與伺服器測試：CakePHP in Aptana with MAMP</title><summary type="text">

RoR in Aptana
RoR的魔術之一，是可以透過Generator等用Ruby寫的腳本程式，一口氣自動地產生整個Model, Controller 跟 View等相關的基本程式碼。唯一可惜的是，這個魔術得在終端機視窗裡，手動地鍵入指令來執行。這種方式對於習慣OSX圖形介面(GUI)的人跟懶得記憶指令碼的我來，說真是一場惡夢。所幸Aptana的RadRails套件，把RoR的Generator等腳本都作成一個個的View視窗，可以透過GUI來選擇執行項目與輸入參數。我想光這個功能就可以讓Aptana登上OSX上的RoR開發環境的前幾名了：
Aptana還有內建主控台(Console)分割視窗來顯示輸出結果，不須要離開Aptana去打開“終端機”程式。Aptana甚至還有內建的瀏覽器，可以直接檢視網頁的輸出結果。只差了MySQL資料庫，如果用Splite這個RoR內建的簡單資料庫</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/7006949004103750935/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx5-cakephp-in.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7006949004103750935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7006949004103750935'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx5-cakephp-in.html' title='CakePHP教學 on OSX(五)開發環境與伺服器測試：CakePHP in Aptana with MAMP'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9jVMTJzBpuYwKf3biqnuhgXrUIM-0NfNTSBd4UgUrVXeXwryRjtkdXxAe9EOjqbs2cnC7OPBHihp72uRnDD_SIBj-RENauh0T2PSyVXwph9dLBm8n53u1_n6nJ1CcJo7-CBUvr1iEd_ja/s72-c/AptanaCake_00.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-7328501494189378943</id><published>2009-12-21T16:40:00.004+08:00</published><updated>2010-02-17T15:17:00.627+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="OnyX"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><title type='text'>CakePHP教學 on OSX(四)安裝CakePHP</title><summary type="text">本來安裝CakePHP真的只是小蛋糕一塊。只要下載之後解壓縮，把檔案丟進伺服器的根目錄就好了。但是如果在OSX上這樣安裝會使得Apache縮短網址的功能，也就是把本來像是 http://www.mysite.com/index.php?action=A&amp;amp;id=B這種長網址的形式，縮短成 http://www.mysite.com/AB 這種短網址的功能失效！

原因是因為CakePHP檔案夾裡設定Apache取用權限的 .htaccess 檔案，在OSX下是屬於隱藏檔。安裝時很容易因為沒有複製到預設的 .htaccess 檔案，而讓Apache的縮址功能失效。當然，自己寫一個 .htaccess 檔案也可以，但很容易出錯。因此我的方法是使用Onyx這個工具程式，把OSX的隱藏檔案顯示出來。這樣就可以減少因為 .htaccess 檔案遺失產產生的問題。
顯示OS的隱藏檔案從Onyx</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/7328501494189378943/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx4-cakephp.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7328501494189378943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7328501494189378943'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx4-cakephp.html' title='CakePHP教學 on OSX(四)安裝CakePHP'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjodHxPSGOyvLybLMPrsGPQnYkwupwIKQPbrO8doQIpajyoDiYAGvohmE55y7gdnLRmcb7l5E5ppD0n9UgCmHPJ60HQLSToMWzOEz1Y2IcPsHk58BEB8U_vIrE4iPkcnfX5douktgStwc6F/s72-c/Onyx_01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-7649099790767612089</id><published>2009-12-21T14:18:00.004+08:00</published><updated>2010-02-17T15:16:31.220+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Aptana"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="PDT"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Plugin"/><title type='text'>CakePHP教學 on OSX(三)開發環境：Aptana &amp; PDT</title><summary type="text">IDE的選擇
Eclipse是受很多開發者歡迎的整合開發環境(IDE)，尤其是開發Java程式。它的優點是免費，以及應用Java開發而產生跨平台的特性。同時擁有很多外掛，可以適應不同的開發語言與開發目的。不過也因為是以Java為基礎，所以先天上的效能與雙位元語言的支援上都有點抱歉，尤其是在OSX上。所幸有Aptana的出現，將Eclipse改寫為OSX的原生程式，大幅提高了執行的效能，但仍具有Eclipse相容性，能支援多數Eclipse用的外掛。

Aptana的開發一開始就是針對Web的應用，因此最初的版本主要針對JavaScript的開發。隨著RoR的出現，Aptana也開發了自己的RoR套件稱為RadRails，1.5版後RadRails變成內建套件，它將RoR開發常用的WEBrick伺服器，Sqlite簡易資料庫，Gem腳本程式等整合在一起，使得Aptana儼然成為OSX上開發</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/7649099790767612089/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx3-aptana-pdt.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7649099790767612089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/7649099790767612089'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx3-aptana-pdt.html' title='CakePHP教學 on OSX(三)開發環境：Aptana &amp; PDT'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqP0zDXEROaP_2YVVo130HICnjI3tgbScjo3Qkq8jnUutZIwZ5YKCj9Mteh9Ub6MsBk5aqnaKckSNdUQodRJLwi7S4G1AHPoD0S1C39Dvtmz8mvVPZQCvk4FDMYeUrmtLdMU_zQcWTIQkE/s72-c/Aptana_00.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-1221327590356688901</id><published>2009-12-21T13:18:00.004+08:00</published><updated>2010-02-17T15:16:02.780+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Apache"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><title type='text'>CakePHP教學 on OSX(二)安裝伺服器：MAMP</title><summary type="text">AMP開發伺服器的選擇

在OSX上要開發AMP網站基本上很容易。因為Apache伺服器跟PHP程式都是內建的，隨著作業系統還有免費的XCode開發環境。伺服器版的OSX Server內建MySQL，只有一般用的OSX版本需要額外安裝MySQL。對於高手來說，OSX上的AMP可以說是萬事俱備。

但是不幸的是，OSX內建的PHP，不知為何缺乏一些網站必要的函式庫，如處理圖檔的GD，處理雙位元語言的mbstring等等。對於程式高手來說，可以用XCode自己編譯這些函式庫並加入PHP，這對於我們這種非科班的程式的開發者來說，在OSX上要安裝這些PHP套件就非常麻煩。

對於我來說，有兩個選擇，一是安裝Marc Liyanage事先編譯好的Entropy PHP套件，另外就是使用MAMP程式。兩者的差別是，前者適用來取代系統內建的PHP，所以啓動方式往往得用到root權限來修改系統內建的一些</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/1221327590356688901/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx2-mamp.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1221327590356688901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1221327590356688901'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx2-mamp.html' title='CakePHP教學 on OSX(二)安裝伺服器：MAMP'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj59iEKKxEDaZ9WqltdlZlbB2_qmg_f-f729Ixuj-pbSQYspD1mC-fWjaBR6f4HemhOjPmJ2lLKCjQrxX9YtnIzp-GgBMc7L8J_Ji1XINOMvEMCnmimqudSvb-d1Zi7B0ci5-7A1ew7CNqJ/s72-c/MAMP_01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-1674942137558367396</id><published>2009-12-21T10:14:00.005+08:00</published><updated>2010-02-17T15:15:24.423+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AMP"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>CakePHP教學 on OSX(一)開發框架：CakePHP vs. RoR</title><summary type="text">網站開發語言選擇

RoR (Ruby on Rails)是新崛起的網站應用開發“框架(framework)”，以能迅速開發網路應用聞名。但對於已經習慣了PHP語法的我來說，Ruby語言實在過於簡化，而且依賴很多特殊的“符號（如&amp;lt;, ::, ?, @）”以及對於整個程式語法都很不習慣。加上Rails框架設計野心很大，整體架構也很龐大，很多魔法般的應用讓人對於整個MVC框架中，指令與資料的來龍去脈難以掌握。因此即使花了幾個月斷斷續續K了“敏捷網站開發(Agile Web Development with Rails)”還是沒看完，對於RoR的整體架構還是如入五里雲般，更別提什麼敏捷開發了。因此，不僅又回頭考慮，是不是該回頭好好研究比較熟悉的PHP程式，然後找一個好用的框架如Zend或CakePHP來應用。

PHP語言也許不如Ruby的簡潔與完全的物件導向，但畢竟發展時間比較久，多數</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/1674942137558367396/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx1-cakephp-vs-ror.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1674942137558367396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/1674942137558367396'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/12/web-development-on-osx1-cakephp-vs-ror.html' title='CakePHP教學 on OSX(一)開發框架：CakePHP vs. RoR'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-8326840530153723370</id><published>2009-07-08T16:11:00.000+08:00</published><updated>2009-07-08T16:29:11.504+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="10.5"/><category scheme="http://www.blogger.com/atom/ns#" term="Leopard"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Rail"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Ruby on Rail@MacOSX Leopard</title><summary type="text">Apple官方教學：http://developer.apple.com/Tools/developonrailsleopard.htmlLocomotive 套件：http://sourceforge.net/projects/locomotive/files/</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/8326840530153723370/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/07/ruby-on-railmacosx-leopard.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/8326840530153723370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/8326840530153723370'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/07/ruby-on-railmacosx-leopard.html' title='Ruby on Rail@MacOSX Leopard'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7045224794957698395.post-5622630284222635339</id><published>2009-02-24T20:41:00.000+08:00</published><updated>2009-02-24T21:33:37.322+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="10.5"/><category scheme="http://www.blogger.com/atom/ns#" term="Admin"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><title type='text'>OSX Server 10.5 Server Admin(1): 安裝與連線伺服器</title><summary type="text">OSX Server 10.5提供了方便好用的伺服器管理程式，可以本地或遠端地管理OSX Server。一、在OSX Client安裝OSX 10.5 Admin Tools如果你不能直接登入OSX Server主機，或必須使用OSX Client版以遠端遙控的方式管理的話，就需要安裝Server版的第二片光碟 Admin Tools 裡的 Server Administration Software。將 Admin Tools 光碟裡的 ServerAdministrationSoftware.mpkg 檔案點二下打開；依照指示將軟體安裝到磁碟機，過程中需要具管理員權限(不是 root)的帳號密碼，安裝過程跟一般軟體相同，應該不需再要詳細說明了吧；安裝完畢後，在 應用程式/Server (/Applications/Server/) 檔案夾裡，就會有管理 OSX Server 的相關</summary><link rel='replies' type='application/atom+xml' href='http://osxinlife.blogspot.com/feeds/5622630284222635339/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://osxinlife.blogspot.com/2009/02/osx-server-105-server-admin1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/5622630284222635339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7045224794957698395/posts/default/5622630284222635339'/><link rel='alternate' type='text/html' href='http://osxinlife.blogspot.com/2009/02/osx-server-105-server-admin1.html' title='OSX Server 10.5 Server Admin(1): 安裝與連線伺服器'/><author><name>傑克‧林</name><uri>http://www.blogger.com/profile/04069448728644093705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir6MGTel5hYG14tj7MAw8nSdFUNcQQqByDgR1R_nyHcpeqgfE4py1ci9UGBEVw8wTZaNBAHoX9NB-wvJdH9S-Jv1ylGkmxGlae1EQKP8ePrIJFoaitzM8_6StFgTym81ogHiWZK42zBs4c/s72-c/serverphp_01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>