Index: src/mapserver/qgsconfigcache.cpp =================================================================== --- src/mapserver/qgsconfigcache.cpp (revision 15861) +++ src/mapserver/qgsconfigcache.cpp (working copy) @@ -73,14 +73,19 @@ QFile* configFile = new QFile( filePath ); if ( !configFile->exists() || !configFile->open( QIODevice::ReadOnly ) ) { + QgsMSDebugMsg( "File unreadable: " + filePath ); delete configFile; return 0; } //then create xml document QDomDocument* configDoc = new QDomDocument(); - if ( !configDoc->setContent( configFile, true ) ) + QString errorMsg; + int line, column; + if ( !configDoc->setContent( configFile, true, &errorMsg, &line, &column ) ) { + QgsMSDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " ) + .arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) ); delete configFile; delete configDoc; return 0; @@ -99,6 +104,7 @@ } else { + QgsMSDebugMsg( "SLD or qgis expected in " + filePath ); delete configDoc; return 0; } Index: src/mapserver/qgis_map_serv.cpp =================================================================== --- src/mapserver/qgis_map_serv.cpp (revision 15861) +++ src/mapserver/qgis_map_serv.cpp (working copy) @@ -126,8 +126,18 @@ return QFileInfo( "admin.sld" ); } +int fcgi_accept() +{ +#ifdef Q_OS_WIN + if ( FCGX_IsCGI() ) + return FCGI_Accept(); + else + return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ ); +#else + return FCGI_Accept(); +#endif +} - int main( int argc, char * argv[] ) { #ifndef _MSC_VER @@ -181,11 +191,10 @@ } } - //creating QgsMapRenderer is expensive (access to srs.db), so we do it here before the fcgi loop QgsMapRenderer* theMapRenderer = new QgsMapRenderer(); - while ( FCGI_Accept() >= 0 ) + while ( fcgi_accept() >= 0 ) { printRequestInfos(); //print request infos if in debug mode Index: src/mapserver/qgsmapserverlogger.cpp =================================================================== --- src/mapserver/qgsmapserverlogger.cpp (revision 15861) +++ src/mapserver/qgsmapserverlogger.cpp (working copy) @@ -57,7 +57,8 @@ if ( !mLogFile.isOpen() ) { #ifdef _MSC_VER - ::OutputDebugString( message.toLocal8Bit() ); + ::OutputDebugString( message .toLocal8Bit() ); + ::OutputDebugString( "\n" ); #endif return; }