How to prepare ur Macbook for webdev

Install XAMPP:At first u have to download XAMPP for Mac OS X from this link and install as per their suggestion:http://www.apachefriends.org/en/xampp-macosx.html
installing XDebug on Mac OS X’s default PHP installation:
1. You are going to need to  download the source code from the XDebug website. (I suggest into your “Downloads” folder to make the rest of the process easier.
2. Unzip the archive from the finder.
3. Open up the Terminal, paste the following command in and hit enter: cd ~/Downloads/xdebug-2.0.3/xdebug-2.0.3/
4. Do the same for this command: phpize
5. This one too: MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure –enable-xdebug
6. And finally this one: make
7. We have just compiled the xdebug module. We now need to copy the compiled file binary file into a place where PHP can find it. From the terminal (again) run the following command: cp modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20060613/
8. Finally we need to edit the /etc/php.ini file so that PHP is aware of the new module. From the terminal run this command: open /etc/. This will open the /etc folder in the Finder allowing you to right-click on the php.ini file and open it in your preferred text-editor (TextEdit or TextMate for example).
9. At the very bottom of that file add the following:
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.file_link_format = “txmt://open?url=file://%f&line=%l”
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
10. In the terminal, for the last time (I promise), run the command: apachectl restart or simply restart your computer.

Now for installation test create a PHP script with a pile of errors in it and you should see colourful error messages when run in a browser (as apposed to plain old black and white text). Or you can download something like MacGDBp – a native debugging application for the Mac.

Advertisements

One Response

  1. cool, so you bought macbook ?

    btw, for web developer i recommend installing LAMP using macports (http://www.macports.org/ ) . it will give you more latest packages and also save your huge time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: