Blog Posts

How to Solve “No input file specified” with PHP and Nginx

“No input file specified” is one of the most frequently encountered issues in Nginx. This is actually an error from PHP and due to display_errors being 0ff people will often just get a blank page with no output. The root cause of the error is that PHP cannot find the file Nginx is telling it to look for, and there are a few common cases that causes this.

Nginx, PHP, Technology

12,000 Requests per second with Nginx, PHP and Memcached

Caching in PHP is usually done on a per-object basis, people will cache a query or some CPU intensive calculations to prevent redoing these CPU intensive operations. This can get you a long way. I have an old site which uses this method and gets 105 requests per second on really old hardware. The method I propose will net you a solid 12,000 requests per second.

PHP Namespace Mindfuck

I love PHP, I really do… just, sometimes you fall into these situations where you just can’t help bang your head against the table until even the table starts bleeding.

PHP, Technology

Book Review: Nginx HTTP Server

Nginx HTTP Server is a new book by ClĂ©ment Nedelcu and published by Packt Publishing, it’s the first English book about Nginx to be available for purchase. Previously users had to depend on the wiki and various blogs for documentation; before that IRC and the mailing list. All aspects of Nginx have undergone huge growth, from the feature set to the user base and finally to the documentation. This book fills an important area in Nginx documentation that has been missing, a hard copy of coherent logical steps that documents the Nginx HTTP server. The wiki is a great source of information, but it’s difficult to print out easily readable material to bring on the train or bus to work, or even if you just want to sit down with a cup of tea and read.

Nginx, Technology

Optimized File Uploading With PHP & Nginx

Performance is often important to people using Nginx – and for good reason, of course. Sadly, while many people will optimize their software stack they will rarely work on optimizing the back-end code; and even more rarely will they eliminate single points of failure. Such was also the case when SitePoint recently published an article about uploading large files with PHP. This post will discuss a method to accept uploads that will scale far better and not offer malicious users an easy DoS vector.

Nginx Configuration Primer

Nginx is a seriously fast reverse proxy and HTTP server, it helps scale most of the biggest sites online. In this guide you’ll learn the basics of writing a solid Nginx configuration and preventing a security issue few people know about.

Nginx, Technology