Just put together 5.3.3 from source (win32). Attempting to test some header() stuff however it appears like it will not use CLI sapi. Worthwhile paperwork on putting your put together source into apache like a module, much like i'd normally use the pre-put together module.

Essentially my test could be from CLI

php -r "header('Content-Type: text/plain', true, 404); var_dump(headers_list());"

I recieve a clear array from headers_list() so I have to understand this built source into apache to ensure that i recieve an answer from headers_list().

Thanks ahead of time men.

------- UPDATE ------

Configure command, yet no apache at this time? http://pastebin.com/qhFVR8A3:

E:\phpsdk\bin\php53dev\vc9\x86\php5.3.3>configure --disable-all --enable-cli --enable-apache2-2handler --enable-apache2-2filter

Enabled SAPI:
| Sapi Name |
| cli       |

----- second UPDATE ----

Downloaded apache, stuck it ins.Orapache and attempted the next command but aren't able to find the headers.


configure --disable-all --enable-cli --enable-apache2-2handler=../apache --enable-apache2-2filter --enable-cgi

---- 3rd Update ---

Enabled SAPI:
| Sapi Name        |
| apache2_2filter  |
| apache2_2handler |
| cgi              |
| cli              |

I have it working now.
E:\phpsdk\bin\php53dev\vc9\x86\php5.3.3>configure --disable-all --enable-cli --enable-apache2-2handler --enable-apache2-2filter --enable-cgi --with-extra-includes=E:\phpsdk\bin\php53dev\vc9\x86\apache\include --with-extra-libs=E:\phpsdk\bin\php53dev\vc9\x86\apache\lib

Just link

The PHP cli SAPI isn't designed to send HTTP headers its purpose will be used in the command line.

If you wish to use PHP with Apache, you have to compile the Apache module SAPI or even the CGI SAPI.

To compile the Apache 2.2 module you'll want the Apache libraries and can include sites in %LIB% and %INCLUDE%, correspondingly, and employ:


Observe that you decide to go the Apache module route, you have to compile it with against same version from the C runtime library the Apache binaries use. This is because PHP must have the ability to allocate memory and pass individuals pointers to Apache for this to free them and vice-versa, and for your to occur properly, the versions should be exactly the same. So, for instance, should you put together (or downloaded from somewhere) Apache put together with Visual C++ 9, you have to use Visual C++ 9 to compile PHP.

There must be much more output compared to couple of lines you've published at http://pastebin.com/qhFVR8A3
Probably there is the content Could not find apache2.2 libraries/headers meaning the configure script couldn't find a minumum of one from the following files:

  • httpd.h
  • libhttpd.lib
  • libapr-1.lib
  • libaprutil-1.lib

Either copy individuals files towards the php-build include/library path or use --with-extra-includes and --with-extra-libs to suggest towards the appropriate sites.