Coder1
Coder1

Reputation: 13321

Why 4 lines per request in Mac OSX apache access_log

I have a local virtualhost configured on my MacBook Pro. (10.7.5) It is running the default Apache 2 and PHP 5.3.15.

I added test.php

<?php
phpinfo();
?>

When I access this once via a browser, 4 lines in my access log show up:

127.0.0.1 - - [20/May/2013:19:15:10 -0700] "GET /test.php HTTP/1.1" 200 89145
127.0.0.1 - - [20/May/2013:19:15:10 -0700] "GET /test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
127.0.0.1 - - [20/May/2013:19:15:10 -0700] "GET /test.php?=SUHO8567F54-D428-14d2-A769-00DA302A5F18 HTTP/1.1" 200 2813
127.0.0.1 - - [20/May/2013:19:15:10 -0700] "GET /test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146

Why are there 4 entries for a single request?

Upvotes: 0

Views: 75

Answers (1)

Gordon Davisson
Gordon Davisson

Reputation: 125788

View the page source in your browser. I'm pretty sure you'll see things like:

<img border="0" src="/test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" />

When your browser sees this in the page, it of course goes and fetches that URL from the server. The suffix on this URL is actually a PHP easter egg that makes the server return the PHP logo, which is then displayed as part of the info page. The other two are the Suhosin and Zend logos, similarly used in the phpinfo page.

Upvotes: 1

Related Questions