phpAdsNew 2 phpAdsNew is an open-source ad server, with an integrated banner management interface and tracking system for gathering statistics. With phpAdsNew you can easily rotate paid banners and your own in-house advertisements. You can even integrate banners from third party advertising companies.
Max Media Manager - Open Source Ad Server Max Media Manager is a set of tools which enable online marketing campaigns. Written in PHP, Max is based on phpAdsNew. The core modules include an Ad Server and Conversion Tracking Tools. The most recent version of Max also has an API for extension modules developed by the community. Yes, this one is derived from the same code as the phpAdsNew 2 server.
Open source Ad Serving and Inventory System (OASIS) OASIS is a high-performance ad server built using PHP on top of MySQL. It is designed to handle many hundreds of thousands of ad impressions per hour. On moderately capable hardware, it is capable of serving in the neigborhood of 500,000 impressions per hour.
adSapient An open source ad server written in Java using Struts etc. It was formerly a closed source product and is used by the AdSapient corporation in their commercial service. They claim it has all the features you could possibly want.
Tclads is a simple, extensible banner rotation system, written mostly in Tcl (a tiny bit of C code is used for password encryption).
UPDATE: I was turned off by all of the above scripts for one reason or another. In response I wrote the dead simple banner advertisement rotation system which is, uh, dead simple to use. It doesn't keep any statistics, it doesn't limit the number of impressions, it doesn't walk the dog, it just selects random banners and displays them.