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

Jason McCreary:
Installing Apache, PHP, and MySQL on macOS Mojave
Nov 30, 2018 @ 17:21:05

Jason McCreary has provided a tutorial on his site today for all of the OS X Mojave users out there about how to install Apache, PHP and MySQL on macOS with the latest operating system changes. This is an update of his previous post covering the same installation on OSX Sierra.

I am aware of the web server software available for macOS, notably MAMP, as well as package managers like brew. These get you started quickly. But they forego the learning experience and, as most developers report, can become difficult to manage.

The thing is macOS runs atop UNIX. So most UNIX software installs easily on macOS. Furthermore, Apache and PHP come preinstalled with macOS. To create a local web server, all you need to do is configure Apache and install MySQL.

He walks you through the full process to get everything up and running:

  • testing to ensure Apache can be started (it comes installed by default)
  • changing the configuration to enable PHP
  • making a phpinfo page in your DocumentRoot to test that PHP is working
  • downloading and installing MySQL
  • configuration changes required to connect PHP and MySQL

He also includes an example of additional changes such as enabling mod_rewrite and a link to a tutorial about setting up virtual hosts on your local machine.

tagged: installation osx mojave update tutorial mysql apache configuration

Link: https://jason.pureconcepts.net/2018/11/install-apache-php-mysql-mac-os-x-mojave/

CloudWays Blog:
PHP-FPM Cuts Web App Loading Times by 300%
Nov 16, 2018 @ 16:18:33

There's several ways to run PHP on various webservers out there and in a tutorial from the CloudWays blog they focus on one: using PHP-FPM and the performance gain it can give.

Speed matters. Our engineers are always looking at ways on improving the stack. One of the major objectives of our stack integrations is to improve the speed of the overall processes of our stack.

Keeping up with this practice, in a bid to increase speed of aspects of Managed Cloud Hosting coupled with constant improvements based on users feedback, Cloudways has now integrated PHP-FPM in all its servers. Owing to this integration, applications hosted on Cloudways servers are now going to perform up to 3x faster.

The post starts with a look at why to choose PHP-FPM and shares some benchmarks of it in use versus the more typical mod_php shared module. It then gets into the implementation steps, linking to a step-by-step guide on how to implement it.

tagged: phpfpm performance tutorial installation benchmark

Link: https://www.cloudways.com/blog/php-fpm-on-cloud/

CodeWall:
Debug PHP In VSCode With XDebug
Jul 25, 2018 @ 16:48:13

On the CodeWall site there's a tutorial posted showing the VS Code users out there how to set up debugging with XDebug for your PHP-based projects.

VSCode is great, the fact that it can work with a vast amount of languages help’s it cater for everyone’s taste. One special tool that comes with VSCode is the Debug feature and when configured correctly, is a dream to use. If you’ve previously worked with Visual Studio 2017 for example, you will know what I mean. This guide will go through how to set-up the PHP xDebug module to work in tandem with VSCode, completely enabling full-on functional debugging across your application.

The tutorial is broken into a few main sections: getting the basics ready, configuring the editor and an example of it in use. It provides screenshots of the editor as it goes along and links to other helpful resources (like the XDebug Chrome helper) to make the process as painless as possible.

tagged: tutorial xdebug vscode debugging setup installation configuration

Link: https://www.codewall.co.uk/debug-php-in-vscode-with-xdebug/

Delicious Brains Blog:
Using VS Code for WordPress Development
Dec 05, 2017 @ 16:15:42

On the Delicious Brains site there's a tutorial that shows you how to use Microsoft's VS Code IDE for PHP development. They focus more specifically on WordPress development but a lot of the environment setup could be used for any PHP project.

If you keep up with the many different text editors and developer tools available, you may have heard of a newer IDE called Visual Studio Code. VS Code is a free, open source code editor that is lightweight like Sublime Text, but offers many of the same features as bigger IDEs like PhpStorm or WebStorm.

In this article I’ll review some features and extensions of VS Code that I really appreciate, and show you how to make the most out of it for WordPress and general web development.

The tutorial walks you through the installation and integration of various PHP development tools including an "intellisense" extension, XDebug support, a Javascript debugger and a few other helpful extensions. Install instructions are included as well as screenshots/screencasts showing the end result.

tagged: visualstudiocode vscode ide introduction installation setup debug integration wordpress

Link: https://deliciousbrains.com/vs-code-wordpress/

Delicious Brains Blog:
Craft CMS | Self-Hosted WordPress Alternatives Part 1
Jul 11, 2017 @ 15:52:03

The Delicious Brains site has kicked off a new series of posts looking at other options besides WordPress for self-hosted content management systems. In this initial article they cover the Craft CMS that's built on top of the Yii framework.

To kick this off, I’ll be taking a look at Craft CMS by Pixel & Tonic, a software development team that was behind some of the best add-ons for ExpressionEngine. They have since moved on from ExpressionEngine to create their own CMS that is built on the popular Yii framework.

Craft bills itself as “a content-first CMS that aims to make life enjoyable for developers and content managers alike”. This is a change in stride from WordPress which appeals to a much wider variety of people, so it should be interesting to see how that change affects Craft CMS as a whole.

The tutorial then walks you through the installation process for Craft and what the interface will look like when everything is set up correctly. He talks about the functionality that's immediately available and some places where he feels Craft "shines" in its features. He then goes through some of the core architecture of the tool, templating, plugins, custom fields, SEO, eCommerce support and the documentation/pricing the project offers.

tagged: wordpress alternative series part1 craftcms introduction installation

Link: https://deliciousbrains.com/craft-cms-self-hosted-wordpress-alternatives/

Fabien Potencier:
Symfony 4: Automate your Workflow
Apr 13, 2017 @ 15:33:24

Fabien Potencier has continued his series looking at Symfony 4 with a new post to his site today. This time he focuses on workflow automation and removing some of the daily application management tasks.

Symfony 4's most "innovative" feature is the way it drives the day-to-day application management. No more tedious copy/paste from README files. No more boilerplate code. Automation to the max. On a curated list of Composer packages.

He starts the post talking about Symfony Flex (the main engine behind Symfony 4) and how it can help with package management and installation/integration. He uses the sensiolabs/security-checker package as an example, showing how Flex understands the package and knows to run the checks on future composer install commands. He then digs into other areas Flex helps with:

  • bundles
  • configuration
  • environment variables
  • makefile tasks
  • Composer scripts

...and a few others. Examples are provided for each of the sections in the composer.json configuration and the post finishes with an example of the full configuration file, putting everything together.

tagged: symfony4 automation workflow integration installation symfonyflex framework

Link: http://fabien.potencier.org/symfony4-workflow-automation.html

Scotch.io:
Get Started Running Laravel in a Docker Container
Mar 07, 2017 @ 20:07:28

The Scotch.io blog has a new tutorial posted showing you how to get a Laravel application up and running in a Docker container with a minimal amount of work. The article assumes you already have a working knowledge of Laravel and Docker, so if you're not familiar with those you'll need to read up there first.

Laravel and Docker are two very popular tools of choice when considering building for the web. Although both of them do very different things, they can both be combined to create amazing products.

For our use case, we will be running Laravel in a Docker container. This is going to be a simple demonstration on how to use both products to create real-life applications. Nothing heavy.

The tutorial starts with some of the prerequisites you'll need before getting started but quickly gets into the commands you'll need to set up your environment. Using a custom Docker container they show you the configuration to get the container set up, how to build the database connection, bring the container up and verify all is working as expected.

tagged: docker laravel container tutorial introduction installation configuration

Link: https://scotch.io/tutorials/get-started-running-laravel-in-a-docker-container

Delicious Brains Blog:
Automating Local WordPress Site Setup with Scripts Part 3: Automating the Res
Feb 22, 2017 @ 16:36:38

The Delicious Brains site has posted a new tutorial, the third part in their "Automating Local WordPress Setup" series, covering the automation of "the rest" of the setup steps. This includes virtual host setup, plugin installation and cleanup.

In my last post in the Automating Local WordPress Setup series, I created a WP-CLI package for quickly installing and uninstalling WordPress. I’ve been using this package for a while now, and have been itching to make it more useful for a typical development workflow.

[...] I also still catch myself doing things that I know should be automated. Things like deleting unnecessary data, removing the default themes/plugins, and installing new plugins, are things that can be automated to make development easier. In this post we’re going to take a look at some ways to make all that possible.

The article is then broken down into three sections with scripts/code that can help with these automations:

  • Working with Virtual Hosts (and MAMP)
  • Cleaning Up the Install (deleting extra themes, plugins, etc)
  • Installing Frequently Used Plugins (your custom list based on a "plugin list" file

The post finishes out with a screencast showing this plugin installation that makes it easier to come up with easy to reproduce, simple to spin up WordPress environments.

tagged: tutorial automation wordpress part3 virtualhost cleanup plugins installation

Link: https://deliciousbrains.com/automating-local-wordpress-site-setup-scripts-part-3-automating-rest/

Symfony Finland:
Symfony Flex set to enable RAD (Rapid Application Development)
Dec 05, 2016 @ 17:58:37

On the Symfony Finland site there's a post that gets into the details of one of the new advancements in the Symfony ecosystem recently announced by Fabien Potencier at SymfonyCon Berlin 2016 - Symfony Flex.

The Symfony team has acknowledged this gap in their offering. And at SymfonyCon Berlin 2016 project lead Fabien Potencier announced what is known as Symfony Flex. Details are not precise, as I was not attending conference, but the tag line for Symfony Flex is: "Composition over Inheritance"

In essence it seems that Flex will allow for zero-config installation of Bundles. This is done using a Composer plugin. You will simply install packages with Composer and if the Bundle supports it, Composer will also author the necessary integration code and configuration.

As with any new thing, Flex support will start out pretty limited but as it grows in support the community should help it thrive in the Symfony ecosystem. The first release of the tooling for Flex will be available in early 2017.

tagged: symfony flex composer package bundle composition installation

Link: https://www.symfony.fi/entry/symfony-flex-to-enable-rad-rapid-application-development

Jason McCreary:
Update PHP on Mac OS X
Sep 20, 2016 @ 15:15:26

Jason McCreary has posted an update to his guide for installing PHP on Mac OS X and replacing the version of PHP that comes with El Capitan (5.5) with a handy package manager more specific to PHP installations.

As noted in my posts on Installing Apache, PHP and MySQL on Mac OS X, OS X comes pre-installed with Apache and PHP. Unfortunately, as of Mac OS X 10.11 (El Capitan) the pre-installed version of PHP is still 5.5. As PHP 5.5 has reached end of life, I imagine the pre-installed version of PHP will be updated with Mac OS 10.12 (Sierra). However, it may only be PHP 5.6.

So what do you do if you want to upgrade or install a different PHP version on your Mac? Well, you could use Homebrew. But I found a pre-packaged alternative - PHP OSX.

With this package manager, the installation is only a few steps but he lists them out with a bit more detail to help you understand what's happening:

  • Installing PHP (your choice of version)
  • Configuring Apache (loading the php5 shared module)
  • Updating your PATH
  • Configuring PHP
tagged: osx update language version package simple installation tutorial

Link: http://jason.pureconcepts.net/2016/09/upgrade-php-mac-os-x/


Trending Topics: