News Feed
Sections




News Archive
feed this:

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

DigitalOcean Community Blog:
How To Deploy a Basic PHP Application using Ansible on Ubuntu 14.04
May 13, 2015 @ 10:15:16

If you've ever been interested in learning Ansible and how to use it in deploying your PHP applications, you should check out this new tutorial from Stephen Rees-Carter on the DigitalOcean blog. He walks you through the full process for getting the server and application set up and configured just the way you need it (on a Ubuntu server).

This tutorial covers the process of provisioning a basic PHP application using Ansible. The goal at the end of this tutorial is to have your new web server serving a basic PHP application without a single SSH connection or manual command run on the target Droplet. We will be using the Laravel framework as an example PHP application, but these instructions can be easily modified to support other frameworks and applications if you already have your own.

He starts with a list of the things you'll already need installed and things to know including a basic understanding of Ansible and two servers (they use their own Droplets in the examples). From there, they walk you through a seven step process to get the automated deployment up and running:

  • Installing Ansible
  • Installing Required Packages
  • Modifying System Configuration Files
  • Cloning the Git Repository
  • Creating an Application with Composer
  • Updating Environment Variables
  • Configuring Nginx

Some of the steps here are Laravel-specific as mentioned but if you're familiar with the setup of your own application, it's pretty easy to adapt. Each step includes the configuration changes and commands you'll need to complete it.

0 comments voice your opinion now!
deploy ansible digitalocean setup tutorial configure laravel framework

Link: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-basic-php-application-using-ansible-on-ubuntu-14-04

Gary Hockin:
Debugging PHP Command Line (with PHPStorm and XDebug)
May 07, 2015 @ 11:47:09

Gary Hockin has a recent post showing how you can debug PHP HTTP requests from the command line using PHPStorm and XDebug. These instructions aren't specific to PHPStorm, however. They can be used in any IDE/editor that supports remote XDebug connections.

At PHP North West I had huge difficulties configuring Xdebug and both my PHP and PHP Storm so they play nice in a CLI environment. So here, for others and almost certainly my future self, is how to do it.

He goes through each step of the setup process assuming that you already have the necessary software installed. He shows how to configure XDebug for remote debugging in the ini configuration, setting up PHPStorm to receive the connection and, finally, adding the "XDEBUG_CONFIG" environment variable to tell PHP to relay the requests back to your waiting IDE.

0 comments voice your opinion now!
remote debugging phpstorm commandline xdebug configure setup environment

Link: http://blog.hock.in/2015/05/04/debugging-php-command-line-with-php-storm/

SitePoint PHP Blog:
Inspecting PHP Code Quality with Scrutinizer
April 29, 2015 @ 11:24:24

The SitePoint PHP blog has a recent tutorial showing you how to use the Scrutinizer service to evaluate the quality and "pain points" in your PHP code, be it a library or full application.

We've gone through a decent number of tutorials about code quality, inspections, auto-build systems and so on here at SitePoint. [...] In this article, we'll take a look at Scrutinizer CI - a continuous integration tool that's quite expensive and closed to private projects, but very handy for public ones.

He starts with a quick comparison of Scrutinizer versus (and really plus) the popular CI service Travis CI. He then walks you through the setup of Scrutinizer to evaluate your application automatically when code is pushed to GitHub. He then gets into the configuration options the service provides including filters, specific checks to evaluate and other tools to execute in the evaluation build. The article then gets into examples of the reports that are provided and a bit of detail about what each view provides. There's also options to hide certain errors that you know aren't actually problems and the "follow up" links it provides for the issues you may not understand.

0 comments voice your opinion now!
inspect code quality scrutinizer tutorial setup configure

Link: http://www.sitepoint.com/inspecting-php-code-quality-scrutinizer/

Alex Bilbie:
Setup Jenkins and test a PHP project
April 20, 2015 @ 10: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.

0 comments voice your opinion now!
jenkins test setup project tutorial digitalocean ubuntu

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

Mike Bronner:
How To Install PHPCI in Homestead
April 10, 2015 @ 08:54:19

Mike Bronner has a new post on Medium.com about installing PHPCI on a Laravel Homestead instance and have it able to execute your builds.

PHPCI is a nifty little swiss-army-knife for your development toolbox. [...] It will monitor your source repositories for changes, and trigger a new build when it sees activity. Then it will let you know if anything went wrong or can be improved. This comes in handy to improve your code quality and minimize errors and issues down the road. In the following section we'll go through the process of installing PHPCI in Homestead.

He goes through the full process of getting the necessary software installed and all of the commands you'll need to:

  • Adding the PHPCI database
  • Clone the PHPCI code
  • Configure the PHPCI install
  • Set up the cron to run automatic builds
  • Configure MySQL
  • Set up the Homestead instance for the new PHPCI site

Check out the full post for more details.

0 comments voice your opinion now!
homestead laravel phpci setup configure install tutorial commands

Link: https://medium.com/@genealabs/how-to-install-phpci-in-homestead-5ee0b022e8be

NetTuts.com:
Using HHVM With WordPress
March 31, 2015 @ 12: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.

0 comments voice your opinion now!
hhvm wordpress setup tutorial configure install ubuntu

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

VG Tech Blog:
How I Set Up My Local PHP Dev Environment on Mac OSX Yosemite in Three Easy Steps
January 16, 2015 @ 11:43:51

On the VG Tech blog today Erland Wiencke has posted a quick guide to the "three easy steps" he uses to set up a PHP development environment on OSX.

When I first started writing this post, I considered giving it a title such as "How to set up local PHP development with dynamically configured mass virtual hosting on Apache 2.4″, "Quick and easy prototyping using Liip PHP, Dnsmasq or Proxy Auto Configuration" or even "The Ultimate Guide to Rapid Development on OSX 10.10″. I did not.

In my daily job as a Development Manager, I don't get to code very much, but when I do, I want to have a setup that allows me to quickly create development projects and prototypes in the ~/Sites folder and have them show up as vhosts automagically, without having to edit any configuration file(s).

His three steps do require a few prerequisites including Homebrew, but that's easy enough to set up. Here's his process:

  • Step 1 - installing (my preferred version of) PHP
  • Step 2 - enable hosting under ~/Sites
  • Step 3 - add a local DNS server

He also includes a "Step 3a" that shows how to test the installation via a simple response from each of the domains.

0 comments voice your opinion now!
development environment osx yosemite local tutorial setup configure

Link: http://tech.vg.no/2015/01/15/how-i-set-up-my-local-php-development-environment-on-mac-osx-yosemite-in-three-easy-steps/

Sameer Borate:
Integrating Googles new reCAPTCHA in PHP
December 17, 2014 @ 09:23:10

Recently Google announced their reCAPTCHA without a CAPTCHA technology to help make preventing automated systems (usually spammers) from causing issues in your applications. In this new post from Sameer Borate, he shows you how to implement this new kind of CAPTCHA in your PHP-based application.

For the past several years Google's reCAPTCHA has helped verify that a user is not a bot by forcing you to decipher warped text. reCAPTCHA's method of protecting websites from spam has always been a kind of burden on the end user who has to solve the captcha to prove that he is human and not a bot. [...] Google recently released a new captcha API called "No CAPTCHA" reCAPTCHA, which utilizes an Advanced Risk Analysis engine that is capable of discerning between users and bots. So instead of solving a jumbled box of text all a user has to do is check a box.

He walks you through the full process of the integration:

  • Signing up for an account/API keys
  • Rendering the HTML for the actual widget (using Google Javascript)
  • Validating the user's response via an API call
  • The PHP you'll need to perform the validation

He also briefly mentions some of the customization available and provides the code as a download so you can see it all working together.

0 comments voice your opinion now!
google captcha nocaptcha recaptcha api tutorial configure setup

Link: http://www.codediesel.com/security/integrating-googles-new-nocaptcha-recaptcha-in-php/

Matt Stauffer:
Introducing Laravel Homestead 2.0
November 17, 2014 @ 10:41:45

In his latest post Matt Stauffer has posted a guide to the latest release of the Laravel Homestead project, version 2.0, walking you through the installation, configuration and validation of this virtual machine.

When Laravel Homestead first came out, it was a Github repository that included a base Homestead.yaml by default. There was no prescribed place to install it, no global commands for accessing the box, and any time you actually customized your Homestead.yaml file you instantly dirtied your Homestead Github clone, making upgrading difficult.

You can guess where I'm going with this. All of these things are problems no more. The latest version of the Homestead ecosystem has just been released, and it's moved Homestead into a globally installable Composer package which copies Homestead.yaml (and any other user-editable files) into ~/.homestead on your machine.

He covers the two different ways you'd get this updated version - the fresh install (no previous VM installed) and the upgrade path. For each all of the commands and configuration updates you'll need are included. He also points out some of the new features and handling as he goes along.

0 comments voice your opinion now!
laravel homestead version introduction install configure setup tutorial

Link: http://mattstauffer.co/blog/introducing-laravel-homestead-2.0

Rob Allen:
Setting up PHP & MySQL on OS X Yosemite
October 20, 2014 @ 09:43:36

Rob Allen has posted a quick guide to help you get PHP and MySQL set up on Yosemite, the latest version of Apple's OSX operating system (just released last week).

t's that time again; Apple has shipped a new version of OS X, 10.10 Yosemite. Apple ships PHP 5.5.14 with Yosemite and this is how to set it up from a clean install. However, if you don't want to use the built-in PHP or want to use version 5.6, then these are some alternatives [including the Liip binary package, Homebrew or Zend Server 7.x).

He opts for the Homebrew method, installing it first then getting into the PHP and MySQL packages. This is all done from the command-line, so you'll need to be comfortable there. He includes the commands needed to install PHP, MySQL and Apache along with all configuration changes to make them work together. He also shows how to install Xdebug, PEAR, Composer and the Mcrypt & Intl extensions if needed.

0 comments voice your opinion now!
setup osx yosemite mysql homebrew package install apache intl mcrypt

Link: http://akrabat.com/php/setting-up-php-mysql-on-os-x-yosemite/


Community Events

Don't see your event here?
Let us know!


example laravel opinion podcast introduction language configure performance community application series api framework release symfony2 interview part2 install php7 conference

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework