<div dir="ltr"><div>That helped a lot Alessandro. Many thanks! Now I'm able to test, what I wanted to test at least.</div><div><br></div><div>But still the issue running QGIS Server using Apache is left.</div><div>Does anyone have an idea on that - could it be an QGIS Server error or is there any mistake in my configs?</div><div><br></div><div><br></div><div>Thanks in advance for your help!</div><div>Regards</div><div>Benedikt</div><div><br></div><div><br></div><br><div class="gmail_extra"><br><div class="gmail_quote">2017-07-25 18:12 GMT+02:00 Alessandro Pasotti <span dir="ltr"><<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Jul 25, 2017 at 5:43 PM, Benedikt Bonath <span dir="ltr"><<a href="mailto:b.bonath@googlemail.com" target="_blank">b.bonath@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Ok, thanks a lot for that fast answer. Maybe this question should have been formulated different. Thats for sure not an issue of QGIS - I was just wondering how I can save the GetMap-response in a valid *.png by requesting the *.fcgi directly. But just in case the solution is in someone mind already, it would be great to know. Otherwise I will figure that out someday later.<div><br></div><div>Regards</div><div><span class="m_1760802940365066903gmail-HOEnZb"><font color="#888888">Benedikt</font></span><div><div class="m_1760802940365066903gmail-h5"><br><div><div><div class="gmail_extra"><br></div></div></div></div></div></div></div></blockquote><div><br></div></span><div>Oh, sorry I misunderstood, if a Python script is an options you might want to check the python API of QGIS Server, you can get the body separate from the headers: <a href="https://qgis.org/api/classQgsServerResponse.html#a84621d1fca986d81f1dd21fbd159eb85" target="_blank">https://qgis.org/api/<wbr>classQgsServerResponse.html#<wbr>a84621d1fca986d81f1dd21fbd159e<wbr>b85</a><br><br></div><div>For an example of how to use it: <a href="https://github.com/qgis/QGIS/blob/master/tests/src/python/qgis_wrapped_server.py#L125" target="_blank">https://github.com/qgis/QGIS/<wbr>blob/master/tests/src/python/<wbr>qgis_wrapped_server.py#L125</a><br><br></div><div>This is for QGIS 3, but QGIS 2 had similar (but not identical) ways to get the same results.<br></div><div><br></div><div>If you cannot use python, a bash script with cut or similar could help to strip the header.<br></div><div><br></div><div>Hope it helps.<br></div><div><div class="h5"><div><br> <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div class="m_1760802940365066903gmail-h5"><div><div><div class="gmail_extra"><div class="gmail_quote">2017-07-25 17:18 GMT+02:00 Alessandro Pasotti <span dir="ltr"><<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Jul 25, 2017 at 5:01 PM, Benedikt Bonath <span dir="ltr"><<a href="mailto:b.bonath@googlemail.com" target="_blank">b.bonath@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:12.8px">Hi everybody, </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have some problems to run QGIS-Server 2.99.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm not sure where the problems exactly come from: mod_fcgid, QGIS-Server or my own settings?</div><div style="font-size:12.8px">With the LTR-Version of QGIS-Server everything works just fine, so I guess the issues are in my environment variables or the current QGIS-Server itself.</div><div style="font-size:12.8px">Hopefully someone is able to answer this question.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The Systems I tried with are (both were clean before):</div><div style="font-size:12.8px">1. </div><div style="font-size:12.8px">Debian stretch</div><div style="font-size:12.8px">Own QGIS-master build AND nightly apt-packages</div><div style="font-size:12.8px">Apache (v2.4.25) with mod_fcgid (v2.3.9)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">2.</div><div style="font-size:12.8px">Windows 7</div><div style="font-size:12.8px">Latest OSGeo4W QGIS-Dev Version</div><div style="font-size:12.8px">Apache 2.4.18 with mod_fcgid (v2.3.7)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">----DEBIAN----</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">When I run the qgis_mapserv.fcgi directly in the command line, everything is fine and I get the right response back.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">##Direct Request</div><div style="font-size:12.8px">QUERY_STRING="SERVICE=WMS&VERS<wbr>ION=1.3.0&MAP=/usr/lib/cgi-bin<wbr>/test.qgs&REQUEST=GetProjectSe<wbr>ttings" QGIS_SERVER_LOG_LEVEL="1" QGIS_SERVER_LOG_FILE="/tmp/qgi<wbr>s_server.log" /usr/lib/cgi-bin/qgis_mapserv.<wbr>fcgi</div><div style="font-size:12.8px">(Btw: Another Problem is to store the response of a GetMap-Request in *.png-File 'QUERY_STRING="......REQUEST=G<wbr>etMap" ./qgis_mapserv.fcgi > /tmp/test.png' because the first four lines are ASCII-Informations about QGIS Server. Maybe someone knows a solutions for that as well?)</div><div style="font-size:12.8px"><br></div></div></blockquote><div><br></div></span><div>I can't tell about the others, but this one is not an issue, it is how HTTP works, the first lines are part of the HTTP header, the end of the header is an empty line, the body follows.<br><br><br></div><div>Regards<span class="m_1760802940365066903gmail-m_-851468483275881922HOEnZb"><font color="#888888"><br clear="all"></font></span></div></div><span class="m_1760802940365066903gmail-m_-851468483275881922HOEnZb"><font color="#888888"><br>-- <br><div class="m_1760802940365066903gmail-m_-851468483275881922m_-1364755422926094181gmail_signature">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</font></span></div></div>
</blockquote></div><br></div></div></div></div></div></div></div>
</blockquote></div></div></div><div><div class="h5"><br><br clear="all"><br>-- <br><div class="m_1760802940365066903gmail_signature">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div></div></div>
</blockquote></div><br></div></div>