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

Auth0 Blog:
Symfony Tutorial: Building a Blog (Part 3)
Mar 27, 2018 @ 16:20:06

The Auth0 blog has posted the third part of their "Building a Blog" series of tutorials showing the use of their authentication technologies coupled with a Symfony framework backend. In this latest article author Greg Holmes shows how to deploy the application created in parts one and two to Heroku.

Symfony is a PHP framework as well as a set of reusable PHP components and libraries. It uses the Model-View-Controller design pattern and can be scaled to be used in any requirement. It aims to speed up the creation and maintenance of web applications, replacing repetitive code. In this part of the series, you will learn how to deploy the blog engine that you have created in the previous parts on Heroku. The final code can be found at this repository.

He starts with a bit of catching up, briefly covering the contents of the first two articles before getting into the main content of this third. He covers some of the basics of Heroku and Travis-CI before getting into the actual deployment flow. He then helps you set up a GitHub account (used as a source for the deployment), set up a local MySQL database for testing and the installation of a few required dependencies. Next is the installation of the Heroku and Travis-CI command line tools, the configuration for each and some basic setup steps for each service.

Finally, he gets back to the Symfony application, setting up a few additional options in the Composer configuration to create a few commands. These commands are then executed as a part of the deployment process. There's also changes to the Symfony configuration files to reference the environment rather than a local path in several locations. The post ends with the setup instructions on the Auth0 side to allow handling to work from the newly deployed Heroku instance.

tagged: auth0 blog symfony tutorial series part3 deploy heroku

Link: https://auth0.com/blog/symfony-tutorial-building-a-blog-part-3/

SitePoint Web Blog:
Heroku Alternative: Deploy Apps with Dokku on DigitalOcean
Jun 29, 2016 @ 15:28:54

On the SitePoint Web blog there's a new tutorial showing you how to deploy applications with Dokku on DigitalOcean in the same way that you might with Heroku.

When Heroku announced their (quite reasonable) new limits for free apps, I realized that I would have to find another source of hosting for all the small, low-traffic projects that I currently have running on Heroku. [...] Since I have such an unreasonable number of apps running on Heroku, I thought it was high time to try out Dokku. Dokku is a Heroku-like tool that allows you to deploy complex apps by simply pushing with Git.

They start with some of the differences between the Heroku setup and Dokku, mostly that Dokku uses Docker for the deployment and configuration. They then show you how to create a Dokku server on DigitalOcean: setting up the domain, making the application and deploying the app with a push and other datastore plugins.

tagged: heroku dokku digitalocean deploy application tutorial

Link: https://www.sitepoint.com/heroku-alternative-deploy-apps-dokku-digitalocean/

Djordje Kovacevic:
PHP cloud hosting comparison (OpenShift vs Heroku vs Fortrabbit)
Jan 22, 2016 @ 17:54:01

In this post to his site Djordje Kovacevic shares the results of his evaluation of hosting providers in the platform-as-a-service arena for hosting PHP applications: OpenShift, Heroku and Fortrabbit.

I want PHP 5.6+, so I did some basic testing of those services to pick cheep and good solution to host my blog. OpenShift because I use it and it's free for 3 small gears, it was pretty good solution few years ago. Heroku because I used it for Ruby on Rails projects and they support multiple languages (even multiple build packs for one project)! I used FortRabbit too, so I decided to test theirs new apps.

For his testing he used a simple Laravel (v5.2) application with a handful of routes - something simple just to test out the setup and deployment processes. There is a "tl;dr" of the results but he also gets a bit more in-depth on what each service has to offer and some of the pros and cons of each. He also includes the results of some basic performance testing on the instances, linking to the raw output if you'd like to run your own metrics against it.

tagged: heroku openshift fortrabbit paas platformasaservice hosting provider comparison pro con benchmark

Link: http://djordjekovacevic.com/articles/php-cloud-hosting-comparison-(openshift-vs-heroku-vs-fortrabbit)

Heroku Blog:
50% and Counting: PHP 7 Takes Off
Dec 16, 2015 @ 19:50:48

As Heroku points out in their latest blog post the popularity of PHP 7 is already rising quickly since they made this major release available on their service and how it's now reached the point of being the most deployed version on their systems.

Last week, we made PHP 7 available on top of a new, reworked version of our PHP support, and our users are adopting PHP 7’s exciting new features and stellar performance improvements quickly - we’re already seeing PHP 7 being used in the majority of PHP deploys on Heroku.

Under the hood, much of the logic that handles a deploy has changed, but not the fundamental principles upon which our support for PHP applications is designed. We've always been determined to provide a fully standards-based implementation that does not rely on proprietary configuration or magic behavior, and that means building on top of a great foundation of tools.

They also mention the rise of Composer in recent years in the PHP community and how they're continuing to treat the composer.json (and .lock) and installation process as first class citizens, making use of Composer itself to install not only dependencies but also language runtimes and extensions.

tagged: heroku php7 installation majority composer support

Link: https://blog.heroku.com/archives/2015/12/15/php7

SitePoint PHP Blog:
More Effective PHP Logging with Loggly
May 08, 2015 @ 16:54:13

The SitePoint PHP Blog has a new tutorial by Yones Rafie showing you how to log more effectively with Loggly, a remote log management service that's easy to connect to your PHP application. (Note: this post is sponsored by Loggly but it's still an interesting tool.)

When logging with PHP, we tend to use the error_log and trigger_error functions, or we can use an error handler to make the logging process more generic. [...] But what would you do if you had to log to multiple places at the same time, or you were sending logs to a given service depending on the error level? Rather than using built-in tools, it’s often easier to use logging libraries.

They go on to talk about logging using a PSR-3 compliant logger and show how to integrate the Loggly service with your application via one of the most popular options, Monolog. The integration is made even easier by the fact that Monolog already comes with a LogglyHandler built-in. The post includes the code you'll need to implement the logger, how to integrate it with a Laravel application, setting it up on Heroku and and a tour of the Loggly features for filtering, searching and examples of the graphs showing query results. Loggly is free to try out, so you can see if it will work for your application before making the commitment.

tagged: loggly logging psr3 monolog tutorial error laravel heroku interface example

Link: http://www.sitepoint.com/effective-php-logging-loggly/

SitePoint PHP Blog:
How to Install Custom PHP Extensions on Heroku
Sep 29, 2014 @ 19:24:56

The SitePoint PHP blog has a tutorial posted for the Heroku users out there showing you how to install custom PHP extensions on the service as a part of your deployment. Heroku is a platform-as-a-service hosting provider that allows for flexibility in the architecture of your systems and spin up/tear down to happen easily and on demand.

In this tutorial, we’ll learn how to install custom extensions on Heroku. Specifically, we’ll be installing Phalcon.

He walks you through creating an account on Heroku first and getting the Heroku toolbelt system installed for your operating system. He then starts in on the Phalcon (a C-based PHP framework) installation including all needed supporting packages/extensions. He uses the PHP buildpack and creates a shell script that is executed when the deployment happens. He includes the commands and configuration to handle the deployment and test the resulting installation.

tagged: heroku tutorial custom extension phalcon deploy paas

Link: http://www.sitepoint.com/install-custom-php-extensions-heroku/

SitePoint PHP Blog:
8 Heroku Add-ons for Production Ready PHP Apps
Jul 14, 2014 @ 17:56:50

The SitePoint PHP blog has a new post from editor Bruno Skvorc with a list of eight Heroku add-ons for PHP applications. These add-ons (they call them "dynos") he lists help with things like logging, monitoring, working with CDNs and adding deploy hooks.

Heroku uses “dynos” as units of computing power which spin up your slugs. Dynos are lightweight, isolated containers for your apps which can execute any process type and can run and scale independently. There are two types of dyno – a web dyno, which handles web requests letting you serve more users as you increase your web dyno power, and worker dynos, which handle everything else like running your code and processing background tasks.

Bruno walks you through getting a sample Laravel-based application up and running on Heroku's PHP functionality and provides a list of add-ons from the Marketplace to get you started. His list includes:

These add-ons and more all come with descriptions, configuration settings/commands to enable them and some with screenshots showing the results.

tagged: heroku addon production application list marketplace

Link: http://www.sitepoint.com/8-heroku-addons-production-ready-apps/

Semaphoreapp.com:
Continuous Integration & Deployment of PHP applications from GitHub to Heroku
Jun 18, 2014 @ 16:35:21

The Semaphore site (a testing and deployment service) has posted a tutorial showing how to set up a continuous integration/deployment using their service, GitHub and Heroku for a PHP application.

The practice of continuous delivery is steadily gaining ground in the PHP community. [...] With PHP support being recently launched on both Semaphore and Heroku, you can set up a continuous delivery pipeline for your web application in a matter of minutes. In this post I will show you how to set up continuous integration and deployment for a simple Laravel web application through Semaphore. You can find the application’s source code on GitHub.

They walk you through the creation of the Heroku application, grabbing the API key and connecting the Semaphore account with GitHub. Once linked, you can select the repository and any build commands needed for deployment. Finally, they show how to configure the actual continuous version of the deployment and have it release after each successful build.

tagged: semaphore continuous deployment integration github heroku tutorial

Link: https://semaphoreapp.com/blog/2014/06/17/continuous-integration-deployment-php-with-github-semaphore-heroku.html

Phil Sturgeon:
Heroku and PHP Sitting in a Tree. K.I.S.S.I.N.G
May 12, 2014 @ 14:40:49

In a recent post Phil Sturgeon talks about the recent news from Heroku about their integrated PHP support and some of his own experience in using the new service feature and migrate his blog over.

Heroku was - as far as I remember - the first (mainstream) PaaS on the market. It was Ruby-only but it was that symbol of modern web development at the time, with the whole "slinging code", "getting shit done", make a Git repo and start shipping bro, hack project/agile-til-it-works mindset. [...] Git push your code, its deployed, one-click installs and drag to scale. It sucked that it was always for Ruby, because as I was also doing a lot of work in PHP I obviously wished I could have the same for my other projects.

He walks through some of the "evolution" of the PaaS (platform as a service) market as it related to PHP environments. He talks about other services like PHPFog, Pagodabox and Fortrabbit. The Heroku added true PHP support and he made his move. He goes through the steps he followed to get his blog migrated over and the commands needed to make the push.

tagged: heroku paas platform service history support pyrocms

Link: http://philsturgeon.co.uk/blog/2014/05/heroku-and-php-sitting-in-a-tree

SitePoint PHP Blog:
HHVM and Hack on Heroku
Apr 30, 2014 @ 17:38:23

In a recent announcement Heroku, a popular platform as a service provider, announced that they now fully support native HHVM support to their platform offerings. In this new post to the SitePoint PHP blog Bruno Skvorc shares some of his own thoughts on the announcement.

In a move that surprised most but displeased none, Heroku, the Cloud Application Platform, has added native HHVM support to their cloud. PHP has long been a viable solution for high traffic production apps, and has had one of the best package managers for a while, not to mention the fact that it’s evolved significantly since the days of “simple hacks for small projects”. The PHP “development model” has been anything but “hackish” in the professional circles for a while now. The unfortunate ignorance of Adam Gross aside, this really is some big news.

Heroku apparently saw an opportunity to engage a whole new area with the integration of HHVM (and Hack) support on their PHP instance offerings. They even offer a method for switching between the normal PHP instances and an HHVM one to make the transition as easy as possible.

tagged: hhvm heroku support release instance paas

Link: http://www.sitepoint.com/hhvm-hack-heroku/


Trending Topics: