Q:

Why is PHP so frequently used on web servers?

My web server uses PHP as do 76.9% of web servers according to W3Techs:
http://w3techs.com/technologies/overview/programming_language/all
The reason I use PHP is an inertia born out of seeing everyone else using it on web servers.  What is it about PHP that would make it so ubiquitous on web servers?
(Note that this question is similar to the following question but takes it in a different direction: Why isn't Java used for modern web application development?) 

A:

PHP is a language that is specifically designed for web programming with built-in integration with the most popular open source database MySQL.

Easy to start with: As a beginner it is easy to start with PHP. The user just have to add a few PHP-tags with e.g. a for-loop in it's existing HTML-files and then upload it to the server and see the result or an error message. Dynamic typing and associative arrays makes it also easier to start using PHP. 
Easy to use: Compared to most solutions like e.g. Java, PHP doesn't need to be compiled, so it's just to write the script and then upload it to the server and then update the browser.
Integrated database support: PHP has (mostly) built-in support for the most popular databases like e.g. MySQL, that means it is easy to start using databases, no additional drivers needs to be installed, just to use the mysql-functions. The easy to use web based admin tool PHPMyAdmin (released 1998) is also important to the PHP's success in combination with MySQL.
Old language (since 1995) with a big user base: PHP became popular early (1995) since it was designed for web programming. Since then the user base has grown and now there is many web-oriented frameworks and libraries available. Some examples are blogg-systems and e-shopping-platforms.
Cheap hosting: Since PHP has existed for long time and works good on both Linux and Windows, and many webservers have support for it. There is no problem to find hosting with PHP pre-installed.

A:

For the same reason MySQL is so popular: it was at the right place in the right time. 
With the Linux server boom in the 90's, the LAMP platform (Linux-Apache-MySQL-PHP) came to scene as a reliable and, most importantly, free option.
As a side note, take MySQL at the time. These were two missing features from MySQL (from the top of my mind, there might be more) not so long ago:

No triggers
Not fully ACID compliant

How did a DB that wasn't even ACID (atomicity-consistency-isolation-durability) compliant get to be so popular? Same answer as PHP: it was at the right place in the right time.
Further reading about the "right place right time" on LAMP components:

https://www.dlitz.net/software/php/
http://www.firebirdfaq.org/faq54/
http://blog.ivanristic.com/2009/05/how-did-mysql-become-so-successful.html
http://news.ycombinator.com/item?id=2463305
https://stackoverflow.com/questions/309300/what-makes-php-a-good-language

A:

If you look around, most folks running PHP these days are running Wordpress, Drupal, Joomla and the like. Or one of 10,000 free, popular apps that pretty much work out of the box with a cheap PHP host and a little configuration. Many times it gets installed not because anyone is making something that runs on PHP so much as the easiest option is to use something built on PHP. 

