Evert Pot451 Unavailable For Legal Reasons (25.6.2019, 15:00 UTC)

If a server refuses to serve content for legal reasons, it can use the 451 Unavailable For Legal Reasons status code.

Examples of this could include government censorship, or DMCA takedown requests.

In many cases when a country censors certain information, it’s also not allowed to discuss that the content was censored. For those cases the 451 status is not going to be very useful, but for cases where it can be discussed, it’s a good status code to use. It’s a more specific version of 403 Forbidden.

The number 451 is a reference to the book Fahrenheit 451, by Ray Bradbury. In the book censorship of literature is one of the central themes. ‘Fahrenheit 451’ is itself a reference to the temperature at which books ignite (232°C in the developed world).

When a resource is blocked, a server should also respond with a Link header identifiying who blocked the request.

This should refer to the entity that’s responsible for the blocking, not the entity that set the policy (so in the case of Youtube it would refer to Google, not the US Government in case of a DMCA takedown).


HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://proxy.example.org/legal>; rel="blocked-by"
Content-Type text/html

<h1>Government policy prohibits you from reading this information.</h1>


  • RFC7725 - An HTTP Status Code to Report Legal Obstacles
Voices of the ElePHPantInterview with Sebastian Feldmann (25.6.2019, 13:31 UTC) Link
Brandon SavageInstalling The Latest PHP on Ubuntu (24.6.2019, 15:23 UTC)

In the past I’ve written up installing various versions of PHP on new releases of Ubuntu, or for new releases of PHP. In those posts I’ve often recommended compiling PHP from scratch. However, compiling PHP from scratch is a serious chore, and keeping it up to date is even more of a serious responsibility. There […]

The post Installing The Latest PHP on Ubuntu appeared first on BrandonSavage.net.

Voices of the ElePHPantInterview with Woody Gilk (20.6.2019, 11:31 UTC)
Derick RethansPHP Internals News: Episode 15: base_convert() Improvements (20.6.2019, 08:15 UTC)

PHP Internals News: Episode 15: base_convert() Improvements

In this fifteenth episode of "PHP Internals News" I talk with Scott Dutton (Twitter, GitHub) about his base_convert() Improvements RFC.

The RSS feed for this podcast is https://phpinternals.news/feed.rss, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news

Show Notes

RFC: base_convert() Improvements


Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0

Become a Patron!
Voices of the ElePHPantInterview with Woody Gilk (19.6.2019, 20:31 UTC)
Rob AllenPHP Architect: Serverless PHP With Bref, Part 2 (19.6.2019, 10:02 UTC)

Cover 768x994

Part two of my article on using Serverless PHP using Bref has been published! In part one, I introduced Bref as we wrote a simple "Hello World" application.

Part follows this up exploring a more complete serverless application, my Project365 website. This S3 hosted static website is build using a serverless PHP function that connects to the Flickr API to retrieve my my one-photo-per-day images and present them on a single page per year. In the article I show how to use Bref to connect to a 3rd party API and use the AWS PHP SDK to update S3 and invalidate CloudFront caches.

The article is in the June 2019 issue of php[architect]. If you don't have a subscription, now may be a good time to take one out!

Evert Pot431 Request Header Fields Too Large (18.6.2019, 15:00 UTC)

When a client sends a HTTP request with HTTP headers that are too big, a server can use 431 Request Headers Fields Too Large in response.

This response can be used if either the total size of all headers exceeded some limit, or if there are individual headers that are too big.

If a client sees a 431, it could hypothetically remove some headers and try again. The most obvious candidate for this could be removing cookies.


HTTP/1.1 431 Request Headers Too Large
Content-Type text/html

<h1>Too many cookies! Try to reduce your cookie footprint.</h1>


Voices of the ElePHPantInterview with Allan MacGregor (18.6.2019, 13:07 UTC) Link
Evert PotBlog archive in space (17.6.2019, 21:14 UTC)

I’ve been writing articles on this blog for about 13 years, and for a while now I’ve marked all of the 400ish articles with geo tags.

This blog is Jekyll-based. To add Geo tags, all I had to do was add the information to the ‘front-matter’. Here’s the header of a sample post:

title: "Browser tabs are probably the wrong metaphor"
date: "2019-06-11 21:14:00 UTC"
  - browsers
  - ux
geo: [43.660773, -79.429926]
location: "Bloor St W, Toronto, Canada"

I thought it would be neat to grab all these posts and plot them on a map, so next to my ‘time-based’ archive, I can look at a ‘space-based’ one.

This is how that looks like:

The archive of this blog in space!

Want to check it out? Browse this interactive map

To generate this map, I did two things. First I generated a .kml file. The process for this is basically the same as generating an atom feed for your Jekyll blog. This is how mine looks like:

layout: null
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
    <name>{{ site.title }}</name>
      This map contains a list of locations where I wrote an article on this blog.
      {% for post in site.posts %}{% if post.geo  %}
        <name>{{ post.title | xml_escape }}</name>
          {{ post.geo[1] }},{{ post.geo[0] }},0
        <atom:link type="text/html" rel="alternate" href="https://evertpot.com{{ post.url }}"/>
      {% endif %}{% endfor %}

Lastly, I needed to generate a map page and use the Google maps API to pull in the .kml:


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

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