title: libxml to stdout when using fastcgi Library
body: <p>We are attempting to create an XML feed using libxml, the code to produce the output is working fine, a valid XML listing is produced, the only problem is that the output goes to the error log (by way of stderr) rather than the required web page (by way of stdout) when using the fastcgi library. The same thing occurs whether the code is run using a browser or curl.</p>
  
  <pre><code>
  Versions/releases:
  Fedora: release 20
  Apache: 2.4.10
  fastcgi:? the latest
  libxml: 2
  </code></pre>
  
  <p>No code has been included with this question as I don't think it will help, the problem is with the fastcgi library 'taking over' stdout and libxml not acknowledging this, rather than with the code itself.</p>
  
  <p>If a listing really is considered necessary then it could be added but will add verbosity without aiding clarity.</p>
  
  <p>In short the question is 'how can we use libxml with fastcgi on Linux/Apache?'</p>
  
  <p>EDIT:Probably would have helped had I mentioned that we are developing in C.</p>
  
  <p>EDIT:Might also help knowing that we have tried all the output methods suggested in <a href="http://www.xmlsoft.org/examples/testWriter.c" rel="nofollow">this standard libxml example</a>, substituting '-' for a 'real' file name, so stdout is used instead. This has not aided our cause, output needs to go to fastcgi's 'cgiOut' alternative but goes to stderr in all cases.</p>
  
  <p>EDIT:As far as I can see it is only possible to pass libxml a file name, not a handle, for where output should be sent. If output should go to stdout, the file name '-' is used, unfortunately, as stated above, output then goes to the error log. If it was possible to pass libxml a file handle (when using fastcgi this would be cgiOut) rather than a name then I suspect the problem would be resolved, but I cannot see any way this can be done.</p>