Mod fcgid get overlap result error

I have installed QGIS Server using the QGIS Server on Windows7 Step-by-step instructions and when I finished and tried doing http://localhost:83/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1...

I have installed QGIS Server using the QGIS Server on Windows7 Step-by-step instructions and when I finished and tried doing http://localhost:83/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities I get an error:

Internal Server Error    
The server encountered an internal error or misconfiguration and was unable to complete your request.    
Please contact the server administrator, admin@local.domain and inform them of the time the error occurred, and anything you might have done that may have caused the error.    
More information about this error may be available in the server error log

The log shows:

 [Wed Dec 12 22:25:19 2012] [notice] Apache/2.2.14 (Win32) mod_fcgid/2.3.6 configured  resuming normal operations
[Wed Dec 12 22:25:19 2012] [notice] Server built: Sep 28 2009 22:41:08
[Wed Dec 12 22:25:20 2012] [notice] Parent: Created child process 3868
[Wed Dec 12 22:25:20 2012] [notice] Child 3868: Child process is running
[Wed Dec 12 22:25:20 2012] [notice] Child 3868: Acquired the start mutex.
[Wed Dec 12 22:25:20 2012] [notice] Child 3868: Starting 64 worker threads.
[Wed Dec 12 22:25:21 2012] [notice] Child 3868: Starting thread to listen on port 83.
[Wed Dec 12 22:26:08 2012] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended.  : mod_fcgid: get overlap result error
[Wed Dec 12 22:26:08 2012] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi.exe
[Wed Dec 12 22:26:09 2012] [error] [client 127.0.0.1] File does not exist: C:/OSGeo4W/apache/htdocs/favicon.ico

What could be the problem ?

PolyGeo's user avatar

PolyGeo

64.4k28 gold badges104 silver badges320 bronze badges

asked Dec 12, 2012 at 20:31

Alophind's user avatar

0

I’ve found out when double clicked «qgis_mapserv.fcgi.exe» that libfcgi.dll was missing.
problem solved.

answered Jan 27, 2013 at 14:07

Alophind's user avatar

AlophindAlophind

2,6775 gold badges38 silver badges74 bronze badges

0

I had the same error log in Apache except for the last row.. I ran the qgis_mapserv.fcgi.exe in cmd and found out that the program missed python modules:

ImportError: No module named site

I simply copied all modules + the folder named encoding FROM C:OSGeo4WappsPython27Lib TO C:OSGeo4Wappsqgisbin

Joseph's user avatar

Joseph

73.9k7 gold badges157 silver badges274 bronze badges

answered Apr 20, 2015 at 9:24

Johan's user avatar

JohanJohan

111 bronze badge

I simply copied all modules + the folder named encoding FROM C:OSGeo4WappsPython27Lib TO C:OSGeo4Wappsqgisbin

This worked for me after long search !!

answered Apr 25, 2015 at 12:31

Yiannis Katsieris's user avatar

For QGIS server version 3 (64bit), there were several settings that I had to change (april 2018):

The libxml2 that comes with Apache 2.4 (64bit) is not compatible with QGIS server. If you run QGIS server with Apache, Apache will pre-load its own version of libxml2 and you’ll get an error about a missing xmlNanoHTMLCleanup entry point.
Fix this as follows:

copy Apache24binlibxml2.dll Apache24binlibxml2.dll.org
copy OSGeo4W64binlibxml2.dll Apache24binlibmxml2.dll

QGIS 3+ switched from QT4 to QT5, also they moved to Python 3+. You have to update your Apache24confextrahttpd_qgis.conf file to look something like this:

LoadModule fcgid_module modules/mod_fcgid.so

FcgidIOTimeout 120
FcgidInitialEnv PATH "C:OSGeo4W64bin;C:OSGeo4W64appsqgisbin;C:OSGeo4W64appsQt5bin;C:OSGeo4W64appsgrassgrass-@grassversion@bin;C:OSGeo4W64appsgrassgrass-@grassversion@lib;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem"
FcgidInitialEnv QGIS_PREFIX_PATH "C:OSGeo4W64appsqgis"
FcgidInitialEnv QT_PLUGIN_PATH "C:OSGeo4W64appsqgisqtplugins;C:OSGeo4W64appsQt5plugins;C:OSGeo4W64appsqt4plugins"
FcgidInitialEnv TEMP "C:UsersYOURUSERNAMEAppDataLocalTemp"
FcgidInitialEnv PYTHONHOME "C:OSGeo4W64appsPython36"

FcgidInitialEnv QGIS_DEBUG 1
FcgidInitialEnv QGIS_SERVER_LOG_FILE C:UsersYOURUSERNAMEAppDataLocalTempqgis-000.log
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 0

Alias /qgis/ C:OSGeo4W64/apps/qgis/bin/

<Directory "C:OSGeo4W64/apps/qgis/bin/">
    SetHandler fcgid-script
    Options ExecCGI
    Require all granted
</Directory>

After restarting Apache, put a qgis project file (yourproject.qgs) in the c:OSGeo4W64appsqgisbin directory and test with:

http://localhost/qgis/qgis_mapserv.fcgi.exe?map=yourproject.qgs&service=WMS&version=1.3.0&request=getcapabilities

answered Apr 5, 2018 at 1:06

anneb's user avatar

annebanneb

1,25111 silver badges11 bronze badges

1

adding the lines

SetEnv PYTHONHOME "C:OSGeo4WappsPython27"
SetEnv PYTHONPATH "C:OSGeo4Wappsqgispython"

to the configuration file

C:OSGeo4Whttpd.dhttpd_qgis.conf

solved the python issue for me (Win 2008 R2)

answered Jan 21, 2016 at 11:22

Jochen Schwarze's user avatar

Jochen SchwarzeJochen Schwarze

14.2k5 gold badges43 silver badges103 bronze badges

Bug #69041 mod_fcgid: get overlap result error
Submitted: 2015-02-12 13:19 UTC Modified: 2021-09-12 04:22 UTC
Votes: 22
Avg. Score: 4.3 ± 0.9
Reproduced: 21 of 21 (100.0%)
Same Version: 6 (28.6%)
Same OS: 8 (38.1%)
From: adam dot tallon at version1 dot com Assigned: cmb (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: 5.6.5 OS: Windows 7 x64
Private report: No CVE-ID: None

 [2015-02-12 13:19 UTC] adam dot tallon at version1 dot com

Description:
------------
All is configured correctly and I can serve HTML pages grand but when I try to request a PHP page no matter how simple or complex the PHP code I get an internal server error in my browser.

PHP was working fine until I started using mod_fcgid. PHP works ok if I use 'LoadModule'.

In the Apache logs I'm getting the below error:
[fcgid:warn] [pid 816:tid 944] (OS 109)The pipe has been ended. : [client xxx.xxx.xxx.xxx:53392] mod_fcgif: get overlap result error
[core:error] [pid 816:tid 944] [client xxx.xxx.xxx.xxx:53392] End of script output before headers: index.php

And all I have in the index.php file is:

<?php
phpinfo();
?>

I'm running the the below:

- Apache 2.4.12 Win64
  - mod_fcgid 2.3.9
- PHP 5.6.5 x64

Apache Fcgid config being used:
FcgidInitialEnv PATH "C:/Program Files/PHP;C:/instantclient_12_1;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 1000 
FcgidMaxProcesses 50 
FcgidMaxRequestLen 8131072
# PHPRC is the location of the php.ini file
FcgidInitialEnv PHPRC "c:/Program Files/PHP"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000

<Files ~ ".php$>"
  AddHandler fcgid-script .php
  FcgidWrapper "c:/Program Files/PHP/php-cgi.exe" .php
</Files>


Test script:
---------------
<?php
phpinfo();
?>

Expected result:
----------------
Should render the PHP info page.

Actual result:
--------------
'Internal Server Error' page.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2015-02-27 21:00 UTC] ml413 at hotmail dot com

Do you have APCU enabled? Like APC, it doesn't handle NTS PHP very well. I got these errors when benchmark testing with APCU enabled on 2008R2, Apache 2.4, and PHP 5.6 NTS or PHP 5.5 NTS using mod_fcgid, but they disappeared when I disabled it. Switching to Wincache with PHP 5.5 was stable.

 [2015-03-02 09:05 UTC] adam dot tallon at versio1 dot com

No, I don't have any APCU enabled. Very minimal configuration.

 [2015-06-05 20:23 UTC] andrewteg at gmail dot com

We had the same problem but apparently had the x86 version. Once we installed a non thread-safe x64 version we were ok again. We got php-5.6.9-nts-Win32-VC11-x64 working.

 [2017-10-26 03:36 UTC] jackzhu at aliyun dot com

Try `php --version`, if you saw nothing, you may just need the **x86** VC11 runtime. On my php x86 nts 5.6.31 + Apache 2.4 x64 + mod_fcgi on Windows 10 x64, install the x86 runtime solved the same problem.

 [2021-08-30 16:32 UTC] cmb@php.net

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb

 [2021-09-12 04:22 UTC] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Author rkorebrits

Joined: 16 Aug 2011
Posts: 11
Location: Cape Town, South Africa

Posted: Tue 16 Aug ’11 16:16 Post subject: The pipe has been ended PHP : mod_fcgid: get overlap
Hi guys,

I have been looking around the web for the last couple of weeks trying to solve an issue we regularly have on our webserver, but without a positive result.

The messages we keep on getting are these:

Code:
[Tue Aug 16 16:08:20 2011] [warn] [client 196.211.1.82] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Tue Aug 16 16:08:20 2011] [error] [client 196.211.1.82] Premature end of script headers: index.php

We are using FCGID 2.3.6 on Windows Server 2008 R2 with Apache 2.2 and PHP 5.3.6.

I have learnt that «Premature end of script headers» ofter is a result of files having the wrong character encoding, wrong line breaks or file permissions. In this case however, I dont know what it would be any of those. Is there some kind of way I can get a detailed report of this? Showing me the exact file contents and where the ‘premature’ end is?

After searching a lot I haven’t found any decent help for solving my problem..

Thanks in advance!

Rich

Back to top James Blond
Moderator

Joined: 19 Jan 2006
Posts: 7163
Location: Germany, Next to Hamburg

Posted: Tue 16 Aug ’11 16:39 Post subject:
There are some bugs in the current version of mod_fcgid. Please read http://www.apachelounge.com/viewtopic.php?t=4157

if you replace the module with the patched version, do you get the same error?

Back to top rkorebrits

Joined: 16 Aug 2011
Posts: 11
Location: Cape Town, South Africa

Posted: Tue 16 Aug ’11 16:56 Post subject:
Thanks! I just did that before your post Let’s see what happens.
Back to top rkorebrits

Joined: 16 Aug 2011
Posts: 11
Location: Cape Town, South Africa

Posted: Tue 16 Aug ’11 17:08 Post subject:
Hmm, no luck unfortunately after some heavy clicking I am still getting the same errors.

This is the recent error log:

Code:
[Tue Aug 16 17:04:57 2011] [warn] [client 41.193.23.10] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer: http://wp.safarinow.com/wp-admin/network/sites.php
[Tue Aug 16 17:04:57 2011] [error] [client 41.193.23.10] Premature end of script headers: index.php, referer: http://wp.safarinow.com/wp-admin/network/sites.php
[Tue Aug 16 17:04:57 2011] [warn] [client 41.193.23.10] mod_fcgid: stderr: PHP Fatal error: Cannot access property started with ‘\0’ in C:\apachewww\wp\www\wp-includes\wp-db.php on line 1019, referer: http://wp.safarinow.com/wp-admin/network/sites.php
[Tue Aug 16 17:04:58 2011] [warn] [client 41.193.23.10] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer: http://wp.safarinow.com/wp-admin/network/sites.php
[Tue Aug 16 17:04:58 2011] [error] [client 41.193.23.10] Premature end of script headers: index.php, referer: http://wp.safarinow.com/wp-admin/network/sites.php
[Tue Aug 16 17:04:58 2011] [warn] [client 41.193.23.10] mod_fcgid: stderr: PHP Fatal error: Call to undefined function x10() in C:\apachewww\wp\www\wp-settings.php on line 78, referer: http://wp.safarinow.com/wp-admin/network/sites.php
[Tue Aug 16 17:04:58 2011] [warn] [client 41.193.23.10] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer: http://wp.safarinow.com/wp-admin/network/sites.php

How can I further test or debug this?

Back to top James Blond
Moderator

Joined: 19 Jan 2006
Posts: 7163
Location: Germany, Next to Hamburg

Posted: Tue 16 Aug ’11 20:10 Post subject:
Since it seems to be a single page. Can you please find out the shortest code that causes this? Than we could open a bug report and hopefully get a fix soon!
Back to top Steffen
Moderator

Joined: 15 Oct 2005
Posts: 2982
Location: Hilversum, NL, EU

Posted: Tue 16 Aug ’11 20:20 Post subject:
Anything in the php log for a clue ?

Also be sure that you configured mod_fcgid correct with the following:

Code:
FcgidInitialEnv PHPRC «x:/xxxx-path to your php.ini»
FcgidInitialEnv PATH «x:/xxxx-path to your php folder»;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;»
FcgidInitialEnv SystemRoot «C:/Windows»
FcgidInitialEnv SystemDrive «C:»
FcgidInitialEnv TEMP «C:/WINDOWS/Temp»
FcgidInitialEnv TMP «C:/WINDOWS/Temp»
FcgidInitialEnv windir «C:/WINDOWS»

Steffen

Back to top rkorebrits

Joined: 16 Aug 2011
Posts: 11
Location: Cape Town, South Africa

Posted: Wed 17 Aug ’11 9:57 Post subject:
@Steffen; isn’t the PHP log in the Apache log? That’s where the PHP messages show up..

I have added the environment variables, the PHPRC was already set, the others i added.

@James; it is on any random page, but I was testing with the homepage with 8 diffrent sites (that run on the same system)

The latest messages I’m getting:

Code:
[Wed Aug 17 09:39:01 2011] [warn] [client 41.193.23.10] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer: http://wp.safarinow.com/PholaBedandBreakfast/
[Wed Aug 17 09:39:01 2011] [error] [client 41.193.23.10] Premature end of script headers: index.php, referer: http://wp.safarinow.com/PholaBedandBreakfast/
[Wed Aug 17 09:39:01 2011] [warn] [client 41.193.23.10] mod_fcgid: stderr: PHP Fatal error: Call to undefined function xc4Gxf1x03xd8Gxf1x03xf0Gxf1x03x80Gxf1x03() in C:\apachewww\wp\www\wp-settings.php on line 88, referer: http://wp.safarinow.com/AubergeRozendalWinefarm/
[Wed Aug 17 09:39:01 2011] [warn] [client 41.193.23.10] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer: http://wp.safarinow.com/JewelOn32JuweelStreet/rooms-rates/
[Wed Aug 17 09:39:01 2011] [error] [client 41.193.23.10] Premature end of script headers: ms-files.php, referer: http://wp.safarinow.com/JewelOn32JuweelStreet/rooms-rates/
[Wed Aug 17 09:44:23 2011] [warn] [client 66.249.71.142] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Wed Aug 17 09:44:23 2011] [warn] [client 66.249.71.142] (OS 109)The pipe has been ended. : mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
[Wed Aug 17 09:49:09 2011] [warn] [client 67.195.114.236] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Wed Aug 17 09:49:09 2011] [error] [client 67.195.114.236] Premature end of script headers: index.php
[Wed Aug 17 09:49:54 2011] [warn] [client 202.160.178.201] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Wed Aug 17 09:49:54 2011] [error] [client 202.160.178.201] Premature end of script headers: index.php
[Wed Aug 17 09:50:52 2011] [warn] [client 202.160.178.205] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
[Wed Aug 17 09:50:52 2011] [error] [client 202.160.178.205] Premature end of script headers: index.php
Back to top Steffen
Moderator

Joined: 15 Oct 2005
Posts: 2982
Location: Hilversum, NL, EU

Posted: Wed 17 Aug ’11 12:13 Post subject:
Looks like a php-issue. I assume a simple php is working like;

The php log is not the apache log, set your php log options in php.ini.

Steffen

Back to top James Blond
Moderator

Joined: 19 Jan 2006
Posts: 7163
Location: Germany, Next to Hamburg

Posted: Thu 18 Aug ’11 9:29 Post subject:
I’d like to reproduce this. I have w2k8r2 too. And I wanna check this out, cause for me it is working fine. Please post your config. Are you using the NTS or the TS version from PHP?
Back to top cmatei

Joined: 07 Jul 2011
Posts: 4

Posted: Sat 01 Oct ’11 23:01 Post subject: Same problem
I have the same problem. (and the same configuration):

    [Sat Oct 01 23:38:57 2011] [info] [client 192.168.0.50] (OS 10054)An existing connection was forcibly closed by the remote host. : core_output_filter: writing data to the network
    [Sat Oct 01 23:38:57 2011] [warn] [client 192.168.0.50] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
    [Sat Oct 01 23:38:57 2011] [error] [client 192.168.0.50] Premature end of script headers: reordoneaza.php
    [Sat Oct 01 23:38:57 2011] [warn] [client 93.116.177.170] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer: .
    [Sat Oct 01 23:38:57 2011] [error] [client 93.116.177.170] Premature end of script headers: index.php, referer: .

The problem arise at random moments. If I refresh the page works fine.

Back to top cmatei

Joined: 07 Jul 2011
Posts: 4

Posted: Sat 01 Oct ’11 23:30 Post subject:
PHP 5.3.6 (cli) (built: Mar 17 2011 10:48:37)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with eAccelerator vSVN427, Copyright (c) 2004-2010 eAccelerator, by eAcceler
ator

in httpd.conf:
FcgidInitialEnv PHPRC «C:/php»
FcgidInitialEnv PATH «C:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/Apache2/bin;»
FcgidInitialEnv SystemRoot «C:/Windows»
FcgidInitialEnv SystemDrive «C:»
FcgidInitialEnv TEMP «C:/Temp/FastCGI»
FcgidInitialEnv TMP «C:/Temp/FastCGI»
FcgidInitialEnv windir «C:/WINDOWS»

FcgidIOTimeout 1800
FcgidBusyTimeout 1800
FcgidConnectTimeout 60
FcgidMaxProcesses 1000
FcgidOutputBufferSize 65536
FcgidMaxRequestsPerProcess 500
FcgidMinProcessesPerClass 0
FcgidProcessLifeTime 3600

Windows Server Web SP2 on 32 bits

Back to top glsmith
Moderator

Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

Posted: Sun 02 Oct ’11 8:39 Post subject:
I had problems with 5.3.4+ till I started using backslashes in the config.

FcgidInitialEnv PHPRC «C:\php»
FcgidInitialEnv PATH «C:\php;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;»
FcgidInitialEnv SystemRoot «C:\Windows»
FcgidInitialEnv SystemDrive «C:»

Back to top cmatei

Joined: 07 Jul 2011
Posts: 4

Posted: Wed 05 Oct ’11 21:15 Post subject:
Nope. it didn’t work
Back to top cmatei

Joined: 07 Jul 2011
Posts: 4

Posted: Mon 17 Oct ’11 0:49 Post subject: RESOLVED
Soved the problem deactivating the eAccelerator in PHP
Back to top wm003

Joined: 24 Mar 2006
Posts: 88

Posted: Mon 17 Oct ’11 9:09 Post subject:
Are you using a x64 compiled version of eaccelerator (just because you say you are using windows 2008 R2) or the x86 version?

The x64 of ea really does not seem to work under x64 systems. i have the same problem. its a pity, but if you want to use eaccelerator under x64 system it seems you need to use a x86 version of php.

unfortunately the alternative wincache has memory problems even under x86 after some hours of work, so i have to use php without any caching on x64 (apache x64, php x64) aswell. i need to stay with x64 because we are using Oracle and the x64 oracle driver seems to be so much faster that i even don’t miss eaccelerator (right now)

Back to top maskego

Joined: 16 Apr 2010
Posts: 238

Posted: Tue 03 Jul ’12 3:14 Post subject:
I upgrade php 5.2.17 to php 5.3.14,the error message shows at error.log

It shows:(OS 109)The pipe has been ended. : mod_fcgid: get overlap result error
Premature end of script headers: index.php

The os is 2003server 32bit and apache 2.2.22.

I use mod_fcgid 2.3.7 downloaded from AH.

I also try to use:
FcgidInitialEnv PHPRC «C:\php»
FcgidInitialEnv PATH «C:\php;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;»
FcgidInitialEnv SystemRoot «C:\Windows»
FcgidInitialEnv SystemDrive «C:»

Источник

Adblock
detector

I have installed QGIS Server using the QGIS Server on Windows7 Step-by-step instructions and when I finished and tried doing http://localhost:83/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities I get an error:

Internal Server Error    
The server encountered an internal error or misconfiguration and was unable to complete your request.    
Please contact the server administrator, admin@local.domain and inform them of the time the error occurred, and anything you might have done that may have caused the error.    
More information about this error may be available in the server error log

The log shows:

 [Wed Dec 12 22:25:19 2012] [notice] Apache/2.2.14 (Win32) mod_fcgid/2.3.6 configured  resuming normal operations
[Wed Dec 12 22:25:19 2012] [notice] Server built: Sep 28 2009 22:41:08
[Wed Dec 12 22:25:20 2012] [notice] Parent: Created child process 3868
[Wed Dec 12 22:25:20 2012] [notice] Child 3868: Child process is running
[Wed Dec 12 22:25:20 2012] [notice] Child 3868: Acquired the start mutex.
[Wed Dec 12 22:25:20 2012] [notice] Child 3868: Starting 64 worker threads.
[Wed Dec 12 22:25:21 2012] [notice] Child 3868: Starting thread to listen on port 83.
[Wed Dec 12 22:26:08 2012] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended.  : mod_fcgid: get overlap result error
[Wed Dec 12 22:26:08 2012] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi.exe
[Wed Dec 12 22:26:09 2012] [error] [client 127.0.0.1] File does not exist: C:/OSGeo4W/apache/htdocs/favicon.ico

What could be the problem ?

PolyGeo's user avatar

PolyGeo

64.4k28 gold badges104 silver badges320 bronze badges

asked Dec 12, 2012 at 20:31

Alophind's user avatar

0

I’ve found out when double clicked «qgis_mapserv.fcgi.exe» that libfcgi.dll was missing.
problem solved.

answered Jan 27, 2013 at 14:07

Alophind's user avatar

AlophindAlophind

2,6775 gold badges38 silver badges74 bronze badges

0

I had the same error log in Apache except for the last row.. I ran the qgis_mapserv.fcgi.exe in cmd and found out that the program missed python modules:

ImportError: No module named site

I simply copied all modules + the folder named encoding FROM C:OSGeo4WappsPython27Lib TO C:OSGeo4Wappsqgisbin

Joseph's user avatar

Joseph

73.9k7 gold badges157 silver badges274 bronze badges

answered Apr 20, 2015 at 9:24

Johan's user avatar

JohanJohan

111 bronze badge

I simply copied all modules + the folder named encoding FROM C:OSGeo4WappsPython27Lib TO C:OSGeo4Wappsqgisbin

This worked for me after long search !!

answered Apr 25, 2015 at 12:31

Yiannis Katsieris's user avatar

For QGIS server version 3 (64bit), there were several settings that I had to change (april 2018):

The libxml2 that comes with Apache 2.4 (64bit) is not compatible with QGIS server. If you run QGIS server with Apache, Apache will pre-load its own version of libxml2 and you’ll get an error about a missing xmlNanoHTMLCleanup entry point.
Fix this as follows:

copy Apache24binlibxml2.dll Apache24binlibxml2.dll.org
copy OSGeo4W64binlibxml2.dll Apache24binlibmxml2.dll

QGIS 3+ switched from QT4 to QT5, also they moved to Python 3+. You have to update your Apache24confextrahttpd_qgis.conf file to look something like this:

LoadModule fcgid_module modules/mod_fcgid.so

FcgidIOTimeout 120
FcgidInitialEnv PATH "C:OSGeo4W64bin;C:OSGeo4W64appsqgisbin;C:OSGeo4W64appsQt5bin;C:OSGeo4W64appsgrassgrass-@grassversion@bin;C:OSGeo4W64appsgrassgrass-@grassversion@lib;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem"
FcgidInitialEnv QGIS_PREFIX_PATH "C:OSGeo4W64appsqgis"
FcgidInitialEnv QT_PLUGIN_PATH "C:OSGeo4W64appsqgisqtplugins;C:OSGeo4W64appsQt5plugins;C:OSGeo4W64appsqt4plugins"
FcgidInitialEnv TEMP "C:UsersYOURUSERNAMEAppDataLocalTemp"
FcgidInitialEnv PYTHONHOME "C:OSGeo4W64appsPython36"

FcgidInitialEnv QGIS_DEBUG 1
FcgidInitialEnv QGIS_SERVER_LOG_FILE C:UsersYOURUSERNAMEAppDataLocalTempqgis-000.log
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 0

Alias /qgis/ C:OSGeo4W64/apps/qgis/bin/

<Directory "C:OSGeo4W64/apps/qgis/bin/">
    SetHandler fcgid-script
    Options ExecCGI
    Require all granted
</Directory>

After restarting Apache, put a qgis project file (yourproject.qgs) in the c:OSGeo4W64appsqgisbin directory and test with:

http://localhost/qgis/qgis_mapserv.fcgi.exe?map=yourproject.qgs&service=WMS&version=1.3.0&request=getcapabilities

answered Apr 5, 2018 at 1:06

anneb's user avatar

annebanneb

1,25111 silver badges11 bronze badges

1

adding the lines

SetEnv PYTHONHOME "C:OSGeo4WappsPython27"
SetEnv PYTHONPATH "C:OSGeo4Wappsqgispython"

to the configuration file

C:OSGeo4Whttpd.dhttpd_qgis.conf

solved the python issue for me (Win 2008 R2)

answered Jan 21, 2016 at 11:22

Jochen Schwarze's user avatar

Jochen SchwarzeJochen Schwarze

14.2k5 gold badges43 silver badges103 bronze badges

I am trying to run memcache, fast-cgi with apache 2.2 + php on a windows 7 machine. If I don’t use memcache everything works fine.

The moment I disable extension=php_memcache.dll in php.ini everything returns to normal.

Once I start apache, the apache logs say:

[Wed Jan 12 18:19:23 2011] [notice] Apache/2.2.17 (Win32) mod_fcgid/2.3.6 configured -- resuming normal operations
[Wed Jan 12 18:19:23 2011] [notice] Server built: Oct 18 2010 01:58:12
[Wed Jan 12 18:19:23 2011] [notice] Parent: Created child process 412
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Child process is running
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Acquired the start mutex.
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting 64 worker threads.
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting thread to listen on port 80.

and after accessing the page (the page just has echo phpinfo()) I get this error in the error.log:

[Wed Jan 12 18:20:54 2011] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended.  : mod_fcgid: get overlap result error
[Wed Jan 12 18:20:54 2011] [error] [client 127.0.0.1] Premature end of script headers: index.php

I have php_memcache.dll in my ext directory and httpd.conf is like this:

LoadModule fcgid_module modules/mod_fcgid.so

FcgidInitialEnv PHPRC "c:/php"
FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 32
FcgidMaxRequestsPerProcess 500

<Files ~ ".php$>"
  AddHandler fcgid-script .php
  FcgidWrapper "c:/php/php-cgi.exe" .php
</Files>

So the problem has to be related to memcache because if I disable it, fast-cgi seems to be working fine. Are there any possible reasons for this??

The memcache service is running… I can check it through control panel->services.

Я пытаюсь запустить memcache, fast-cgi с apache 2.2 + php на машине с Windows 7. если я не использую memcache, все работает нормально.

в тот момент, когда я отключаю extension = php_memcache.dll в php.ini, все возвращается в норму.

как только я запускаю apache, журналы apache говорят:

[Wed Jan 12 18:19:23 2011] [notice] Apache/2.2.17 (Win32) mod_fcgid/2.3.6 configured -- resuming normal operations
[Wed Jan 12 18:19:23 2011] [notice] Server built: Oct 18 2010 01:58:12
[Wed Jan 12 18:19:23 2011] [notice] Parent: Created child process 412
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Child process is running
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Acquired the start mutex.
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting 64 worker threads.
[Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting thread to listen on port 80.

и после доступа к странице [страница просто имеет echo phpinfo ()]. я получаю эту ошибку в error.log

[Wed Jan 12 18:20:54 2011] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended.  : mod_fcgid: get overlap result error
[Wed Jan 12 18:20:54 2011] [error] [client 127.0.0.1] Premature end of script headers: index.php

У меня есть php_memcache.dll в моем каталоге ext, а httpd.conf выглядит так:

LoadModule fcgid_module modules/mod_fcgid.so

FcgidInitialEnv PHPRC "c:/php"
FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 32
FcgidMaxRequestsPerProcess 500

<Files ~ ".php$>"
  AddHandler fcgid-script .php
  FcgidWrapper "c:/php/php-cgi.exe" .php
</Files>

поэтому проблема должна быть связана с memcache, потому что, если я отключу его, fast-cgi, похоже, работает нормально. какие-либо возможные причины для этого ??

служба memcache запущена .. я могу проверить это через панель управления-> службы

Понравилась статья? Поделить с друзьями:
  • Mocp fatal error no valid sound driver
  • Mock axios error
  • Mocha error cannot find module
  • Mobile legends как изменить снаряжение
  • Mobile friendly другая ошибка