Thijs FerynInterviewing Michelle Sanver and discussing Drupal 8, Drupalcon & Michelle’s move to Zürich (3.10.2015, 15:33 UTC)

I was at Drupalcon in Barcelona last week and talked to a lot of cool people. Michelle Sanver is one of them.

The post Interviewing Michelle Sanver and discussing Drupal 8, Drupalcon & Michelle’s move to Zürich appeared first on Thijs Feryn's blog.

SitePoint PHPBuilding Custom cTools Plugins in Drupal 7 (2.10.2015, 16:00 UTC)

cTools is one of those critical Drupal 7 modules many others depend on. It provides a lot of APIs and functionality that makes life easier when developing modules. Views and Panels are just two examples of such powerhouses that depend on it.

cTools makes available different kinds of functionality. Object caching, configuration exportability, form wizards, dialogs and plugins are but a few. A lot of the credit you would normally attribute to Views or Panels is actually owed to cTools.

Drupal logo

In this article, we are going to take a look at cTools plugins, especially how we can create our very own. After a brief introduction, we will immediately go hands on with a custom module that will use the cTools plugins to make defining Drupal blocks nicer (more in tune to how we define them in Drupal 8).


cTools plugins in Drupal 7 (conceptually not so dissimilar to the plugin system in Drupal 8) are meant for easily defining reusable bits of functionality. That is to say, for the ability to define isolated business logic that is used in some context. The goal is to set up that context and plugin type once, and allow other modules to then define plugins that can be used in that context automatically.

If you’ve been developing Drupal sites for more than a year you’ve probably encountered cTools plugins in one shape or form. I think the first plugin type we usually deal with is the content_type plugin which allows us to create our own custom panel panes that display dynamic content. And that is awesome. Some of the others you may have encountered in the same realm of Panels are probably context and access (visibility rules). Maybe even relationships and arguments. These are all provided by cTools. Panels adds to this list by introducing layouts and styles that we normally use for creating Panels layouts and individual pane styles. These are I think the more common ones.

However, all of the above are to a certain extent a black box to many. All we know is that we need to define a hook to specify a directory and then provide an include file with some definition and logic code and the rest happens by magic. Going forward, I would like us to look into how a plugin type is defined so that if the case arises, we can create our own plugins to represent some reusable bits of functionality. To demonstrate this, we will create a module that turns the pesky hook system of defining custom Drupal blocks into a plugin based approach similar to what Drupal 8 is using.

The final code (+ a bit more) can be found in this repository if you want to follow along. And I do expect you are familiar with the steps necessary for defining custom Drupal blocks.

Continue reading %Building Custom cTools Plugins in Drupal 7%

Evert PotGoing freelance (2.10.2015, 13:40 UTC)

Dear readers,

As of October I'm switching things up a bit, and giving the freelance life a shot again.

It's a bit of a scary step! If you know anyone who might need a PHP programmer for a short or long-term project, perhaps you can consider me!

My resume is right here at: My end game is to work regularly for a small set of recurring customers, but any step that helps me get there is very appreciated!


nick halsteadIn Defense of WebSummit (2.10.2015, 10:02 UTC)


I really don’t often comment on the news but the last couple of weeks I have seen a consistent pattern of attack on WebSummit by those who really should know better, I won’t name names but I count the people who are attacking WebSummit + Paddy Cosgrove amongst my friends and I want to put forward a view from someone who is independent of any commercial bias – i.e. I don’t own a newsite (that is affiliated with other events) or run my own events.

I have been to WebSummit for the last 4 years (it could be 5 I lose track!) – I remember the day very vividly that Paddy reached out to me out of the blue with what seemed at the time like a crazy made up story, he told me he was getting together hundreds of founders, including the likes of Jack Dorsey, Chad Hurley, Michael Birch and many more for a Founders only event, I must admit at the time I was pretty damn skeptical, I had never heard of the event which was unusual, and it just seemed ludicrous that you could get that number of big name founders to all gather together in one spot. I called a few other Founder friends and they confirmed they were also going. I immediately called Paddy back and said I would attend.

I won’t cover F.ounders in detail but it has been over the years (along with Founders Forum) been the most important event I attend each year – every year I meet and connect with people who have in some way massively influenced me and help me on the journey. Also the importance of F.ounders is that it is in itself a massive draw – and it lets Paddy use that to get the biggest names in the world on stage.

Every year I spend a good amount of time at the WebSummit as well (F.ounders occurs after the end of WebSummit) – I don’t often sit and listen to the talks, but given the big names that every year speak and that the halls are bursting to the seams most of the time I can only believe they are good. I like to spend my time walking the halls looking at what the startups are doing – and this gets to the core of the attacks that WebSummit is getting, that he is charging for startups to attend.

As a starting point – every year when I walk around what absolutely blows me away is that the halls are literally solid with people, that every single pod / booth with a startup on is overloaded with attendees. DataSift has had booths at pretty much every major Tech conference – and I can tell you 90% of them you spend most of the time twiddling your thumbs while you wait for people to come out of the sessions. That includes other big conferences like Techcrunch Disrupt (we were finalists in 2010? in SF)

Back to the money – I have had to pay for pretty much every event we have had a booth at, (I think we got some free space one year back in the days of FOWA) – but in general we paid (in cash or sometimes in-kind of supply of our own services), and each time I did what every startup should do – look at the cost and look at what the potential upside is. It is massively disingenuous to say that startups should not pay, everyone has a business model for events, things have to get paid for, booth setup costs are huge, so either sponsors pay, investors pay, attendees pay, or the startups pay or some ratio of all of them.

I don’t like ‘free’ – it means I have become the monetisation – i.e. someone else is paying for me to be there – and they want something from me. To say anything different is just trying to hide the model.

So in summary – in general with your eyes wide open – you mostly get what you pay for in this world (always negotiate!) – WebSummit is an amazing event for getting in front of a huge audience of developers and investors.

Truncated by Planet PHP, read more at the original (another 831 bytes)

Cal EvansInterview with Mikhail Vink (2.10.2015, 05:00 UTC) Link
Lorna MitchellPHP Learning Path from O'Reilly (1.10.2015, 10:23 UTC)

I'm very excited to announce that some of my content is featured in the PHP Learning Path from O'Reilly. The Learning Paths are a good way to buy a bundle of content from different people on related topics, and the introductory pricing is always a good deal! Their newest offering is the PHP Learning Path, which has a video course on PHP and MySQL, my intermediate PHP Video course (they wouldn't let me call it "all the things Lorna thinks PHP developers need to know" unfortunately!) and also my video course Git for Web Developers which has a bunch of PHP in it as well as my best git tips and tricks.

I think it's a pretty well-rounded collection and it's only $99 for a couple of weeks, so get the PHP Learning Path here and let me know what you think?

PHP Learning Path from O'Reilly was originally published on LornaJane by Lorna. Lorna is a web development consultant, tech lead, author, trainer, and open source maintainer, and she is occasionally available for freelance work.

PHP ClassesCreate Microsoft Word DOCX files from HTML in PHP Part 1: Simple Example (1.10.2015, 04:03 UTC)
By Ashraf Gheith
Many PHP applications require to export documents in Microsoft Word formats. However, most PHP developers only have experience in generating HTML Web pages.

Read this article to learn how to quickly create Microsoft Word DOCX format using HTML templates.
PHP: Hypertext PreprocessorPHP 5.6.14 is available (1.10.2015, 00:00 UTC)
The PHP development team announces the immediate availability of PHP 5.6.14. This is a security release. Two security bugs were fixed in this release. All PHP 5.6 users are encouraged to upgrade to this version. For source downloads of PHP 5.6.14 please visit our downloads page, Windows binaries can be found on The list of changes is recorded in the ChangeLog.
PHP: Hypertext PreprocessorPHP 5.5.30 is available (1.10.2015, 00:00 UTC)
The PHP development team announces the immediate availability of PHP 5.5.30. This is a security release. Two security bugs were fixed in this release. All PHP 5.5 users are encouraged to upgrade to this version. For source downloads of PHP 5.5.30 please visit our downloads page, Windows binaries can be found on The list of changes is recorded in the ChangeLog.
Ruslan YakushevHow to warm up Azure Web App during deployment slots swap (30.9.2015, 16:23 UTC)

Azure Web App deployment slots are used to help roll out new versions of an app without downtime or cold start activation. New version is typically deployed to a staging slot, then after testing and final verification it gets swapped into a production slot. During the swap operation the Web App’s worker process may get restarted in order for some settings to take effect. Even though the swap does not proceed until the restarted worker process comes back online on every VM instance, it may still not be enough for application to be completely ready to take on production traffic. This post explains how you can use the recently enabled Application Initialization Module to completely warm up your application prior to swapping it into production.

First of all it is necessary to explain the sequence of actions that happens when a staging slot is swapped into production. When the Swap button is clicked in Azure Portal or a corresponding management API is called:

  1. The App Settings and Connection Strings that are marked as “Slot” are read from the Production slot and applied to the site in the Staging slot. That causes the site’s worker process to be restarted for those changes to take effect and become visible as process environment variables;
  2. Then the site in the staging slot gets warmed up. To warm up the site an HTTP request is made to the root directory of the site to every VM instance where site is supposed to run. The warm up request has a User-Agent header set to “SiteWarmup”;
  3. After warm up has completed the host names for the sites in production and staging slots get swapped. Now the site that has been warmed up in the staging slot starts getting production traffic and the site that used to be in the production slot is now in the staging slot
  4. The site that is now in the staging slot gets updated with the App Settings and Connection Strings associated with the staging slot. That causes restart of that site, but it is not in production slot any more so restart is harmless.

Sometimes hitting the site’s root URL is not enough to completely warm up the application. For example it maybe necessary to hit all important routes in an ASP.NET MVC app or to pre-populate the in-memory cache. That is where the Application Initialization Module can help.

Let’s use a simple example to demonstrate how a Web App can be warmed up in the deployment slot during the swap operation. First let’s create a site and a staging deployment slot:

Next let’s set some slot settings on the App and its staging slot. These slot settings will cause the App’s worker process to restart during swap.

For the actual app code I used two simple PHP files: index.php and warmup-cache.php. The index.php is served when site’s root URL is requested. The warmup-cache.php is my “cache warmup” code that takes long time to run (emulated by sleep() command). In real application that can be the script that makes database queries to fill up the cache.

Finally I also have a web.config file which configures AppInit module:

  <applicationInitialization >
    <add initializationPage="/warmup-cache.php" hostName=""/>

In the applicationInitialization section I can specify multiple URL paths that need to be requested in order to warm up my application. In my case I only need to hit one URL. Also notice that I can specify the host name to use for the warm up requests (this is optional and if not specified the “localhost” will be used as a host name).

The following steps are just for verification/debugging purposes. There is no need to perform them when using AppInit module. In fact enabling them for your production site may considerably slow it down.

To confirm that the warmup-cache.php is actually re

Truncated by Planet PHP, read more at the original (another 4540 bytes)

LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP