Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Re-introducing Vagrant: The Right Way to Start with PHP
Jun 09, 2015 @ 13:57:59

The SitePoint PHP blog has a new tutorial posted showing you the right way to start with PHP using Vagrant. Vagrant allows for the easy creation and management of local virtual machines that work as self-contained environments and make for easy reuse.

I often get asked to recommend beginner resources for people new to PHP. And, it’s true, we don’t have many truly newbie friendly ones. I’d like to change that by first talking about the basics of environment configuration. In this post, you’ll learn about the very first thing you should do before starting to work with PHP (or any other language, for that matter). We’ll be re-introducing Vagrant powered development.

He starts off by getting everyone on the same level with an introduction to what Vagrant is, how its set up and some of the advantages is brings to the table. He moves to the next piece of software needed, VirtualBox, that actually hosts the virtual machines. With that installed you'll then need Vagrant. With those both set up, he talks more about what makes this a perfect setup for PHP development and information about their preferred VM, the Homestead Improved image. He ends the post with some links to other resources and SitePoint's own posts with more information on this powerful setup.

tagged: vagrant homestead improved tutorial virtualbox gettingstarted

Link: http://www.sitepoint.com/re-introducing-vagrant-right-way-start-php/

Reddit.com:
How to get Laravel set up in a VM using PuPHPet
Sep 12, 2013 @ 18:50:51

On Reddit.com there's a new post from trymuchharder showing how to get a full environment - complete with Git, Composer, PHPUnit and an install of Laravel - up and running with Vagrant+PuPHPet. It's shared as a series of screencasts so you can follow along the whole process.

This took some time to get set up and i figure others can benefit from what i learned. [...] I've never done a screencast/tutorial and apparently the QuickTime/iMovie combo produces a super crappy video but hopefully you can distinguish which pixels are what. Please excuse my Texan accent and general ineptness when it comes to server stuff. [...] This all assumes you have the following installed to your local machine: Vagrant, VirtualBox, Composer, PHPUnit and Git.

It's a four part video series he's posted to YouTube (over on his account) and it shows the flow through the entire process including a small bit about using Laravel there at the end.

tagged: laravel puphpet vagrant virtualbox virtualmachine

Link: http://www.reddit.com/r/PHP/comments/1m7r74/how_to_get_laravel_set_up_in_a_vm_using_puphpet/

Juan Terminio's Blog:
Setting Up a Debian VM, Step by Step
Jul 04, 2012 @ 18:01:32

In this new post Juan Terminio shows you how to set up a new virtual machine (VM) that hosts a Debian system (replacing the setup of his previous tutorial for setup of a Ubuntu system) in VirutalBox.

Previously, I created a tutorial on installing a 32-bit Ubuntu VM with PHP 5.3.x. I’ve since moved on to PHP 5.4.x and Debian, which is universally considered a safer bet for a server OS. This tutorial is what I will point back to in the future when I want to show people how to create a VM, so you should consider the Ubuntu-based tutorial obsolete. In reality, Ubuntu is based on Debian, so the bulk of this tutorial will be very similar to the Ubuntu one, albeit with some minor changes here and there.

He starts with a few reasons to use a VM over the more traditional single development system mentality including keeping the "server" off your desktop and the dev-to-production similarity needs. He shows how to use the VirtualBox software and a Debian ISO to create the VM, complete with screenshots of each step of the way (for both host and guest OSes). He also helps you get a few things installed including sudo, setting up the network, configuring the hosts file and installing some common utilities as well as the MySQL, Apache, PHP and Samba combination (with PHP compiled from the 5.4.x source).

tagged: debian virtual machine vm tutorial virtualbox install

Link:

Ben Ramsey's Blog:
Build PHP 5.4 on CentOS 6.2
Mar 06, 2012 @ 15:58:38

In this latest post to his blog Ben Ramsey shows you how to, inside of a virtual machine, set up a server with PHP 5.4 installed (using CentOS 6.2).

In case you haven’t heard the news, the PHP project released version 5.4.0 last Thursday. Naturally, I decided it was time to install and give it a try. I chose to install to a clean and bare-bones CentOS 6.2 virtual machine using VirtualBox. I did this for two reasons: 1) I wanted a clean environment for the build, and 2) I wanted to play with CentOS. At the time of this writing, there are not yet any official CentOS RPMs for PHP 5.4, so I had to build PHP from source. What follows are the notes I took during the installation and build process. I hope you find them helpful.

His instructions cover the full process:

  • Installing the CentOS operating system
  • Creating a non-root user
  • Setting up the network for local access
  • Installing the packages for PHP (via yum)
  • Grab PHP 5.4 and compile it
  • Testing out the web server with a sample phpinfo file

He includes a lot of extensions in his installation, some you may not need like pspell, tidy, calendar, ftp or xsl.

tagged: virtual machine virtualbox centos install process tutorial

Link:

Project:
phpVirtualBox - VirtualBox Management Tool
Mar 02, 2012 @ 14:25:16

For those fans of virtualization (and running VMs for development) you're not stranger to VirtualBox. Over on the Google Code site, there's a project that wants to make it easier to work with your VirtualBox instances via a PHP-driven interface.

An open source, AJAX implementation of the VirtualBox user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. Much of its verbage and some of its code is based on the (inactive) vboxweb project. phpVirtualBox was designed to allow users to administer VirtualBox in a headless environment - mirroring the VirtualBox GUI through its web interface.

The tool isn't designed to be a management tool for a "hosting" type of environment, but rather to help you admin all of your VMs at once (no "ownership"). It uses the SOAP service (vboxwebsrv) that comes with VirtualBox servers to create a clean interface.

tagged: virtualbox management project server soap vbowweb virtual machine

Link:

Joshua Thijssen's Blog:
Setting up a development environment
Feb 06, 2012 @ 15:27:41

In a new post to his blog Joshua Thijssen gives a guide to how he usually sets up his development environments when working in PHP. It includes working with virtual machines, configuring DNS and setting up his tools to work with it all.

Doing development on multiple projects can be a burden from time to time. One project would be running on PHP 5.3, while another still needs 5.1. Sometimes you need a MySQL server, while on other occasions, you need a NoSQL solution like couchDB or MongoDB together with all kind of gearman functionality. This article shows you how I’ve setup such a development platform that allows you to quickly create new projects, and still maintain flexibility when you need it.

He uses VirtualBox with either a Debian or CentOS installation as a base platform. He uses Vagrant to set up and configure the machines to make setup almost automatic. He still has to go in and configure a few things like the VirtualHost and DNS settings for the site/application he's working on. Next up is setting up the tools he uses, specifically XDebug and setting up his editor of choice (PHPStorm) for remote debugging.

tagged: development environment virtualbox debian centos mysql vagrant xdebug phpstorm dns virtualhost

Link:

DZone.com:
Creating a virtual server with Vagrant: a practical walkthrough
Nov 18, 2011 @ 14:18:45

On DZone.com there's a new post from Giorgio Sironi looking at how to automate a build of a virtual server with Vagrant, setting up a LAMP-based development instance.

Vagrant ia a tool for building virtual machines (in VirtualBox's format) that conforms to a specification. It's written in Ruby, but it makes really no assumptions over the environments that you're gonna build; in this article, we will setup a virtual server for PHP applications running inside Apache.

The end result is a virtual machine based on VirtualBox images and can be built in a few easy steps:

  • install the vagrant gems on the build system
  • add a new virtual box instance pointed to a .box file
  • create the Vagrant config (including the commands to run post-create)
  • set up a little port forawrding
  • creating a phpinfo file and starting up Apache

One suggested place for grabbing images (some with pre-defined software) is Bitnami's "Stacks" repository.

tagged: vagrant ruby gem install tutorial virtualbox image build

Link:

DZone.com:
Using a virtual machine to play with multiple versions of PHP
Nov 04, 2011 @ 15:15:04

On DZone.com Giorgio Sironi has a new post talking about a development practice that's becoming more and more popular (rather than the old standby of one development platform for all developers) - using virtual machines as reusable, easily renewable platforms. He talks about the process he went through to set up PHP, including the commands used during the process.

This is an occasion to learn about a virtualization tool which I'm not familiar with, VirtualBox. The goal is to install PHP 5.4, which is not yet a stable release, to play around with new features such as traits without ruining the setup on my primary machine (which runs the super-stable PHP 5.3). Although it may be possible to run them together (I'm not a sysadmin), it's really simpler to install one of them in a virtual machine that can be thrown away if something goes wrong.

Using VirtualBox he describes the process of getting a Ubuntu system up and running including a custom compile of PHP with things like curl, bz2, mbstring and openssl support. With that installed and the Apache packages all set up, it should just be a matter of hitting your localhost's web server. If you're looking for older (or just other) versions of PHP to compile, check out the Historical Releases page on the PHP.net site.

tagged: virtualbox virtual machine development platform compile

Link:

PacktPub.com:
Develop PHP Web Applications with NetBeans, VirtualBox and Turnkey LAMP Appliance
Aug 26, 2009 @ 17:06:48

On PacktPub.com (Packt Publishing) there's a recent article from Alfonso Romero that looks at using the combination of NetBeans, VirtualBox and the Turnkey LAMP appliance to set up a development environment.

We will learn how to configure NetBeans, VirtualBox and the Turnkey LAMP Appliance to develop complex PHP applications in a virtual environment. This article explains the process of creating a virtual machine, configuring the NetBeans PHP IDE, and managing a WordPress project with NetBeans in a step wise manner.

He walks you through each step of the way including links to all the software you'll need, screenshots of the VirtualBox setup, and how to setup NetBeans to work with the WordPress installation.

tagged: netbeans tutorial virtualbox turnkey wordpress

Link:

Server-Side Magazine:
Creating a PHP 5.3 Virtual Development Environment
Jul 21, 2009 @ 18:03:31

On the Server-Side Magazine site there's a recent post for the cutting edge developers out there that want to get to testing their code on PHP 5.3 but don't want to cause issues with their current environment. The solution? Install Ubuntu in a VirutalBox instance!

Since the official release of PHP 5.3 many developers want to test the new features out, but still don’t want to mess with the old PHP installation. Same thing goes for me, I don’t want to mess up my existing PHP installation yet, but eager to test namespaces, late static binding and closures. So let's create a virtual development environment using the latest software bundles.

They walk you through every step of the way - complete with screenshots - to get Apache 2, MySQL 5 and PHP all up and running inside of a VirtualBox running Ubuntu 9.04. You'll need to know a little bit about working with packages and compiling to get the job done (there's no official PHP 5.3 package yet) and be able to use your editor of choice to change a few values in configuration files.

tagged: tutorial environment development ubuntu virtualbox

Link:


Trending Topics: