Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Setting up Deployer for AMPPS on MacOs

I use deployer for my deployments but recently I upgrade my XAMMP to AMPPS and I relaised I have so many things not working again inclucing my deployer. I never had the reason to test it after I migrated to AMPPS because I felt it would work out of the box but I was dissapointed when I have to use it right in from of  client.

It took me three days to figure out what was really going on. However, I was able to solve it. I decided to create this blog post to document the lessons I learnt and how I resolve this issue.

If you have your php pointing to your AMPPS php version this way..

export PATH="/Applications/AMPPS/php-5.6/bin:$PATH"

that is the problem. It is the reason you are getting below error

$ dep deploy
PHP Fatal error: require(): Failed opening required 'recipe/common.php' (include_path='phar:///usr/local/bin/dep/bin/../:.:') in /Applications/AMPPS/www/deploy.php on line 4
Fatal error: require(): Failed opening required 'recipe/common.php' (include_path='phar:///usr/local/bin/dep/bin/../:.:') in /Applications/AMPPS/www/deploy.php on line 4

So here is what is going on...PHP is looking for the resource where it is not. It means the required phar is not pointing to other resources in reference to your project.

The solution is...let your path be as follows

export PATH="/Applications/AMPPS/php-5.6/bin:$PATH"

With this, your Mac will be forced to use it's default PHP on your system and that solves the problem. If you need to upgrade your PHP. Do the following

$ curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
$ sudo vi ~/.bash_profile

This opens your bash profile, make your path this export PATH=/usr/local/php5/bin:$PATH

Run this on your terminal

$ source ~/.bash_profile
$ sudo apachectl restart

You should be very good now.

Hope this helps someone too.

 


comments powered by Disqus