I have a Linux server where php is configured with nginx + fcgi.
The fastcgi_finish_request function works correctly as expected.
I have another machine with Windows 10, configured with apache + fcgi. The windows httpd.conf file has the following configuration snippet:
LoadModule fcgid_module modules/mod_fcgid.so
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 16
FcgidMaxRequestsPerProcess 1000
FcgidMaxProcesses 50
FcgidMaxRequestLen 8131072
# Location php.ini:
FcgidInitialEnv PHPRC "c:/php"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper c:/php/php-cgi.exe .php
</Files>
On both machines all php scripts work correctly, with the exception of this function. On Windows I get a fatal error stating that the function does not exist.
Fatal error: Uncaught Error: Call to undefined function fastcgi_finish_request() in C:\www\teste.php:5 Stack trace: #0 {main} thrown in C:\www\teste.php on line 5
- Does the fastcgi_finish_request function exist in Windows?
- Do I need to enable something additional in php.ini?
The initial snippet of my phpinfo () in Windows 10:
PHP Version 7.1.0
System Windows NT NB67000 10.0 build 10586 (Windows 10) AMD64
Build Date Dec 2 2016 05:20:58
Compiler MSVC14 (Visual C++ 2015)
Architecture x64
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:/Windows
Loaded Configuration File C:\php\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20160303
PHP Extension 20160303
Zend Extension 320160303
Zend Extension Build API320160303,TS,VC14
PHP Extension Build API20160303,TS,VC14
Debug Build no