Learning to set up a Development Environment for web Application Projects on OSX

Install Local Server Environment :

To keep it simple, I use MAMP, a one-click-solution to set up my personal developing environment.

I  download the current version from https://www.mamp.info/en/ including the php-version, if other needed then included in the MAMP app. For creating one single development environment the free version is great. For multiple projects the PRO version is reasonable.

I run the installer of MAMP.pkg

Systemwide PHP Version

To make sure I also operate on the same php version like MAMP when running commands from the terminal I update OS X’x PHP version to MAMP’s Version like this:

add to .profile:

Run source command to make this changed active:

Check if it’s working with:

Enable MySQL Commands to run From Terminal

To enable MySQL commands to be run without entering the whole path each time when using on the command line I add as above for the PHP-Version to .profile:

I add to .profile:

I ru the source command to make this changed active:

And I check if it’s really working by typing in a MySQL command such as:

Subversion to Check out Code From Repositories

Subversion is already a part of OS X. Maybe not the newest version, but usable.
So no further steps to be taken.

Check out the Code:

To check out the code I will be working with I use svn checkout command in the directory to which I want the code to be downloaded to:

svn: runs the subversion application
co: runs a checkout
https://path-to-the-repository/trunk: is the remote path where subversion will download the code from
trunk: tells subversion to download the code to a to be created folder called “trunk”

Install Composer Dependencies Locally

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

https://getcomposer.org/doc/00-intro.md

The above link tells in detail how to install.

Setup PhpStorm

PhpStorm is an integrated development environment that helps with a lot of little details. It costs quite some, but there is a 30 day free trial that showed my the worth of this purchase.

The link below hold all infos for setting up PhpStorm:

https://confluence.jetbrains.com/display/PhpStorm/Installing+and+Configuring+MAMP+with+PhpStorm+IDE

Setup Xdebug

Xdebug is a PHP extension which provides debugging and profiling capabilities.

https://en.wikipedia.org/wiki/Xdebug

https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

and with MAMP:

http://stackoverflow.com/questions/11618178/settings-up-xdebug-on-mamp-pro

Ressources I’ve Been Using to Learn This:

https://www.mamp.info/en/

https://www.tutorialspoint.com/svn/index.htm

https://getcomposer.org/doc/00-intro.md

https://confluence.jetbrains.com/display/PhpStorm/Installing+and+Configuring+MAMP+with+PhpStorm+IDE

https://en.wikipedia.org/wiki/Xdebug

https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

http://stackoverflow.com/questions/11618178/settings-up-xdebug-on-mamp-pro

Learning to Disable Text Terminals From Blanking in Raspbian (Linux)

EDIT:

By now, I cannot confirm that this is really working… Sorry.

When developing on a Raspberry Pi I wanted to get rid of screen blanking when not touching the terminal for some time. To do so I had to change some settings in a config file as follows. Continue reading Learning to Disable Text Terminals From Blanking in Raspbian (Linux)

Learning to Downgrade to Older Python Package

When using some piece of code I found somewhere on a blog post I came across the problem that it was not running with the actual flickrAPI I wanted  to work with.

As I needed a quick and dirty solution I downgraded to the older version of flickrAPI as follows. Continue reading Learning to Downgrade to Older Python Package

Learning to Erase a File or a Directory Using Mac’s Command Line

Of course I could do all that with my OS’s built in tools on the GUI. But I was just keen how to do using command line tools… 😉 Continue reading Learning to Erase a File or a Directory Using Mac’s Command Line

Learning to Access an OpenWRT Access Point Using SSH

To make edits in the settings of an OpenWRT WiFi access point on the command line I need to learn how to gain access to this AP by SSH from my Mac’s terminal. Continue reading Learning to Access an OpenWRT Access Point Using SSH

Learning to find out a Networks active IPs using Mac’s terminal

To check in the current network for surrounding devices’ IP addresses I learned to use the command line in my Mac’s terminal Continue reading Learning to find out a Networks active IPs using Mac’s terminal

Learning to Format a SD Card as FAT32 Using Mac Command Line

To format a SD card (or any other sort of disk you can connect to your Mac) using command line I do as follows: Continue reading Learning to Format a SD Card as FAT32 Using Mac Command Line