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

DotDev.co:
Manage custom VM with Laravel Forge
Feb 15, 2017 @ 16:22:14

On the DotDev.co blog today there's a post from Jordon Brill showing you how to manage custom VMs with Laravel Forge. In his particular setup, the VMs he was working with weren't ones created by Forge so he needed to do some custom work to integrate the two.

I had a legacy php application that I wanted to move to a newer version of php. This application is not built on Laravel but rather is a conglomerate of a bunch of different php scripts and pieces of different frameworks. We recently deployed a Laravel-based application to a server running on AWS via Laravel Forge and Laravel Envoyer and fell in love with the service. We were completely up and running in about 10 minutes and it was great.

This case, however, was a bit outside of the typical scenario since it was not a Laravel application and Forge wasn’t going to be creating the server on one of the built-in services that Forge has an integration with (Linode, DigitalOcean, and AWS).

He starts by creating a new VM instance of a Ubuntu-based Linux system. He then shows how to connect it up to Laravel Forge via the "Custom VPS" option. This provides you with a custom command and token to use to make the connection to manage the server via Forge from then on. He does point out a few "gotchas": that it all needs to be run as the "root" account and that you'll need to open SSH ports in your firewall (if you have one) to allow the Forge service access.

tagged: laravel forge envoyer vm custom setup ubuntu tutorial

Link: https://dotdev.co/manage-custom-vm-with-laravel-forge-dc4c3218e415#.sehaglgkh

Phillip Shipley:
Docker makes upgrading to PHP7 easy
Apr 25, 2016 @ 16:13:07

In this post to his site Phillip Shipley talks about Docker and how using it for your PHP deployments can make it much easier to upgrade to PHP 7.

Last year at php[tek] 2015 during the hack time I messed around and created a Docker image to run and test PHP7. It was surprisingly easy and I quickly learned that the app I was working on at the time ran fine in PHP7, good deal. So since then I’ve been awaiting the general availability release of PHP7 to move forward with upgrading my apps.

The main thing holding me back was I just didn’t want to maintain an image based on compiling from source. Not that it’s a problem, it just didn’t feel as clean and simple as using supported packages.

He points out that Ubuntu 16.04 was released and that does now have PHP 7 as a standard package so he's happily upgrading. He gets into a bit of detail about how upgrade process and some of the smaller issue he faced along the way. He also includes the update to his Dockerfile he made to change to PHP 7 (only a few characters) to rebuild with PHP 7.0.4.

tagged: upgrade php7 docker ubuntu package official release

Link: http://www.phillipshipley.com/2016/04/docker-makes-upgrading-to-php7-easy/

Lorna Mitchell:
PHP 7.0 (and 5.6) on Ubuntu
Feb 11, 2016 @ 16:52:59

In this new post to her site Lorna Mitchell show you how to get both PHP 7 and PHP 5.6 installed on a Ubuntu-based system with the help of a custom PPA (Personal Package Archive).

PHP 7 is released but for those of us who don't usually compile our own PHP, it can be a long wait for our preferred distro to release the packages we want. For Ubuntu, I'm using a PPA which allows both PHP 5.6 and PHP 7.0 to be installed, including things like extensions, at the same time. It was very easy to set up (I'm running Ubuntu 15.10 but this process should also work on older versions back to at least 14.04 which is the previous LTS) so here's a quick walkthrough of what I did.

She then shows you how to:

  • Add the PPA to your system (this one)
  • Install the new versions as expected with apt-get
  • Configuring and switching between versions as needed

She ends the post talking about extensions and the issues that could come up when compiling them against each of the versions. This includes installation instructions so you can easily enable and disable the extensions much like the "sites available" some Apache installations use.

tagged: php7 php56 ubuntu ppa package install custom extension tutorial

Link: http://www.lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu

Rob Allen:
Simple Ansible file for Z-Ray preview
Sep 15, 2015 @ 15:12:07

For those wanting to check out the latest preview of the Zend Z-Ray stand-alone version, Rob Allen has posted a full Ansible script to help building the environment much easier.

Recently, Zend made available a Z-Ray Technology Preview which takes the Z-Ray feature of Zend Server and makes it stand-alone. This is very interesting as it means that I can run it with the PHP 5.6 on Ubuntu 14.04 LTS Vagrant set up that I prefer. I decided to create an Ansible playbook to install Z-Ray into my VM. The Z-Ray instructions are clear enough, so it was simply a case of converting them to a set of YAML steps as who wants to do manual installation nowadays?!

The configuration is set up to run on a Ubuntu machine with PHP 5.6 installed. It will download the Z-Ray plugin, extract it and copy over all necessary configuration files to get it up and running. This stand-alone version can help to make debugging your applications simpler with real-time information right in your browser.

tagged: zray preview standalone version ansible configuration ubuntu php56

Link: http://akrabat.com/simple-ansible-file-for-z-ray-preview/

Alex Bilbie:
Setup Jenkins and test a PHP project
Apr 20, 2015 @ 15:14:32

Alex Bilbie has posted a new tutorial to his site showing you how to set up Jenkins to test a PHP project. Jenkins is a popular automated build tool that can be used to do helpful things like automatically run unit tests and execute other tasks when code changes happen (or on an automated schedule).

After a chat with some other developers on Twitter the other day I offered to write a tutorial on how to setup Jenkins from scratch and create a job to test a PHP project. For this tutorial I'm going to use a Digital Ocean droplet (get $10 free credit with this link) but you can use a server from anywhere. Once I've installed and setup Jenkins I'm going to create a job to test my Proton framework.

He walks you through the setup of the server (Ubuntu running on a Digital Ocean instance) and the commands you'll need to get the required tools installed, including Jenkins. He configures Nginx to work as a proxy for the Jenkins installation (config included) and how to secure the installation. This is done via a GitHub OAuth connection and plugin. He helps you get Composer installed, an SSH in place for committing back to GitHub and creating a first job. He also includes a listing of several helpful tools that can be used to test your scripts and applications to provide more detail and better quality to the resulting code.

tagged: jenkins test setup project tutorial digitalocean ubuntu

Link: http://alexbilbie.com/2015/04/setting-up-jenkins/

NetTuts.com:
Using HHVM With WordPress
Mar 31, 2015 @ 17:11:03

On the NetTuts.com site today they've posted a new tutorial showing you how you can use WordPress with HHVM now that they're 100% compatible.

Over the past few months HHVM has taken the PHP community by storm. Since WordPress 3.9 was released, HHVM is now 100% compatible with WordPress.

Unfortunately, HHVM is not quite ready for use in production in self-hosted environments. In my experience, HHVM crashes about once per day, which makes it not viable for a site where high availability is important. Recently, WP Engine has released project Mercury which seamlessly allows HHVM to gracefully fail by falling back to PHP 5.5 when it fails. In this article, we're going to install HHVM on an Ubuntu server running the latest LTS release, 14.04.

They walk you through the full process including:

  • installing MySQL
  • Installing Nginx
  • Installing HHVM
  • Setting up and configuring them all to play nicely with WordPress

It's a pretty short article and doesn't get into the specifics of the WordPress setup steps past ensuring it's working with HHVM but it does give a good starting place.

tagged: hhvm wordpress setup tutorial configure install ubuntu

Link: http://code.tutsplus.com/articles/using-hhvm-with-wordpress--cms-21596

SitePoint Web Foundations Blog:
Quick Tip: Install Zend Server 7 on an Ubuntu 14.04 Vagrant Box
Jul 22, 2014 @ 16:14:30

The SitePoint Web Foundations blog has a post from Bruno Skvorc showing how to install Zend Server on Ubuntu 7 set up and configured by Vagrant.

I recently took a look at Zend Server 7, the latest version of the powerful application monitor/manager suite. This quick tip will show you how to get it installed on a Vagrant box so you too can experiment with its features.

The process is made up of four (well, five...one is optional) steps making it pretty easy to try out:

  • Install Prerequisites
  • Clone and Boot
  • Download and Run Installer
  • Fix Log Permissions
  • Deploy an Application (the optional one)

He includes the code updates you'll need to make and some screenshots along the way to be sure you're on the right track.

tagged: zendserver install vagrant ubuntu tutorial

Link: http://www.sitepoint.com/quick-tip-install-zend-server-7-ubuntu-14-04-vagrant-box/

Binary Tides Blog:
Setup Apache 2.4 and Php FPM with mod proxy fcgi on Ubuntu 13.10
Dec 02, 2013 @ 19:06:17

On the Binary Tides blog there's a new setup tutorial showing how to get Apache 2.3 and PHP FPM up and running with mod_proxy FCGI on Ubuntu (13.10, more specifically).

With the arrival of mod_proxy_fcgi Apache finally gets the ability to neatly talk to external fastcgi process managers making it more efficient at the task. Delegating php requests to external fpm servers greatly reduces the load on web servers like apache resulting into efficient utilisation of machine resources and faster processing speed for users on the other end. Along with all that, php fpm can run opcode caching engines like apc in a very stable manner.

The rest of the post is divided up into the steps you'll need to get things up and running

  • Setup Apache (including VirtualHost)
  • Setup Php-FPM
  • Test the setup
tagged: setup configure apache phpfpm modproxy fcgi ubuntu tutorial

Link: http://www.binarytides.com/setup-apache-php-fpm-mod-proxy-fcgi-ubuntu/

Lorna Mitchell:
PHP and Gearman: Unable to connect after upgrade
Feb 28, 2013 @ 18:55:48

Lorna Mitchell has shared some advice about correcting an issue with PHP and Gearman after she did an upgrade via PECL.

I upgraded PHP and related pecl modules on my development machine today, and ran into a problem with Gearman. Actually I ran into more than one! Firstly the challenge of getting the newest pecl version working with a gearman version. Then an error where my existing PHP application couldn't connect to gearman after upgrade.

Running on Ubuntu, she found this tutorial helpful in getting Gearman back into a working state and installed (version 1.1.1). The "unable to connect" error turned out to be a change in how the Gearman connection needed to be made - the addition of a port to the connection string made things work again.

tagged: gearman connection issue pecl ubuntu port

Link:

Lorna Mitchell:
Managing PHP 5.4 Extensions on Ubuntu
Nov 29, 2012 @ 17:08:44

In this new post to her site Lorna Mitchell shares a handy tip for those using Ubuntu (or a Debian-based distribution) about how to manage your PHP 5.4 extensions and the "php5enmod" tool.

My shiny new VPS* runs Ubuntu 12.10 (official subtitle: Quantal Queztal. Local nickname: Quirky Kestrel) and therefore has PHP 5.4 installed. It's very new so every command I type is missing, and today I realised that included a PECL module (pecl_http, of course). [...] What's happened here is that all debian-flavoured unixes have adopted this standard for their PHP 5.4 packages, so if you're using debian, ubuntu, or any of their relatives with PHP 5.4, you'll see a directory structure like this. When you add a module to PHP, you'll add a file to the mods-available directory enabling the module and adding any config specific to it.

She points out that the "phpenmod" command, accompanied by the PECL extension to install, is the newer way to correctly get these extensions downloaded and configured correctly.

tagged: manage extension ubuntu php5enmod install linux

Link:


Trending Topics: