Happy 25th birthday, PHP!

PHP 25th birthday

PHP, the language that has truly changed the web, is celebrating its 25th birthday. Over time, it gained an army of fans and army of haters, and it’s still difficult to tell which one is larger.

As someone who is using the language since its early days (yes, PHP 3), I’m glad to see that it is still around, it is still going strong, and it is still vital for the larger portions of the web.

Huge thanks go to the core development team, community, and millions of contributors and users.  It wouldn’t have been the same without you.  Happy birthday, PHP!

And here’s an awesome timeline to help you remember all the years!

 

Send additional HTTP headers to Nginx’s FastCGI

It’s not that often that I come across a useful, but undocumented feature in a major software application.  It happened recently, so I’ll document it here just for the future self.

For a particular setup, I had to send additional HTTP headers (let’s use X-GEOIP for this example) to the PHP-FPM, which was configured as a FastCGI backend in Nginx web server.  This StackOverflow thread suggested several solutions, but this one was the easiest and worked like a charm: use Nginx’s fastcgi_param directive AND prefix your variables with HTTP_.  For example:

location ~ \.php$ {
  fastcgi_param HTTP_X_GEOIP $geoip;
  ... other settings
}