hi, i have been through these problems before so these are the posible solution i will go for,
1, can you run the default file which comes with apache( mind that it has #!/ in the correct place)
2, i use to think that Content-type: text/html should be followed by \n\n
3, try to run the file from cmd