Developing a new site: The Setup

via <a href="http://zolutionhouz.com/" target="_blank">Zolutionhouz.com</a>

Just as I was complaining that I lacked ideas for a project to work on to prove my development skills an idea hit me. One drawback that I see in starting the development of any project is getting things setup. Especially since I haven't done a lot of in-depth programming lately. This post describes what I chose to work with (Laravel, Eclipse, GitHub, and an Ubuntu server in a VM) and hurdles faces in just getting setup to do the actual dev work.

I already had an Ubuntu server with a LAMP stack setup within a VirtualBox VM, but hadn't used it in a while. So, I spent some time updating both VirtualBox and Ubuntu. I wanted to access the code base for the new site from my Windows laptop (the VM host), so I also installed and configured Samba on the guest server. Next up was creating a new configuration in Apache for the new site and then modifying my Windows hosts file to point to the dev server. I downloaded a new copy of the PDT Eclipse package since its PHP Developer Tools are best suited for web development, at least within a PHP context. I also setup a private repository on my GitHub account.

All of this together is to serve the purpose of attempting to keep me current on web development practices: use of versioning system and properly maintaining branches, using a real IDE (as opposed to editing files with NotePad++), and developing & administering a server other than the live, production server. All of this was straightforward and did not include any real problems. The fun began with actually using it all and getting development server in a guest VM, Eclipse to access the code base on the dev server from my host machine, and Git to dance together correctly.

I had never attempted this combination of products and get then working in sync. So, it took some trial and error, but I figured it out. First, in Eclipse I used the Git interface to clone the repository I had set up on GitHub. In doing so, I specified the working directory for the repository was the shared directory from me dev server. Next up, I installed Composer on my dev server. Laravel uses Composer to help maintain dependencies and add packages to a site. The Composer plugin for Eclipse seemed to enjoy crashing Eclipse, so I used it directly on the server. With Composer, I installed Laravel into a temp directory on my Samba shared directory. I didn't have to install it here, but I needed it somewhere convenient for Eclipse.

Within Eclipse I created a new PHP project using the temporary directory containing Laravel. Next, in the project, I went to Team -> Share Project and "shared" it with the previously created Git repository. Eclipse then moved the code base from the temporary directory to the repository's working directory. Weird, I know, but it works and I am able to access the site's source code from Eclipse with the code base on my dev server and Apache pointing to said code base. Yay, the setup is complete. Now time to start the real work and learn about Laravel.

All that done and after a couple days of coding in my spare time, I just came across a much bigger problem. My dev box was upgraded to the latest version of PHP which allows me to use Laravel 5.1. However, my web hosting provider is using an older version of PHP which caused the site to silently implode (aka white screen of death) when deployed to it. Whoops. Now to see which is faster, getting my web hosting provider to upgrade PHP or to revert my work to using Laravel 5.0

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.