Setting up your MAMP Environment for Zend Tool

I wanted to get a bit more familiar with Zend Tool and so I set out setting it up on my machine.

I am currently using MAMP Pro, with PHP 5.3.5.

You will need to copy the Zend library folder into:

/Applications/MAMP/bin/php5.3/lib/php/

And your Zend ‘bin’ folder contents into:

/Applications/MAMP/bin/php5.3/bin/
–zf.bat
–zf.php
–zf.sh

Then setup an alias in your terminal to reference the the zf.sh file – to do so, run the following commands:
cd /etc
sudo vi profile

—- Then go down to the end of the file and paste:

alias zf=/Applications/MAMP/bin/php5.3/bin/zf.sh
export PATH=/Applications/MAMP/bin/php5.3/bin/:$PATH
export ZF_HOME=/Applications/MAMP/htdocs

This will set your default project path to be in the htdocs folder, and your php version to reference the 5.3 instance in MAMP.

Save the file by hitting the Escape key, then type:
wq!

This will save and exit the file. Go ahead and close your terminal, and re-open it.

Try typing:
zf show version

You should now be greeted with the current version of the Zend Framework that the script is connected with.

UPDATE:

After attempting to create a new zend framework project, I ran into a problem with the home path not being picked up correctly… So I had to set it at a deeper level within OSX – please see:

http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x

References:

http://wrightcreativelabs.com/blog/62-zend-framework-setup-mac-os-x-with-macports.html

http://www.digitalsurgeons.com/blog/the-lab/howto-install-zend-mamp-ma/

Thursday, June 30th, 2011 Uncategorized

Leave a Reply

You must be logged in to post a comment.

[ad code=1 align=center]