php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67951 php-cgi.exe crashes with thread safe version
Submitted: 2014-09-02 18:56 UTC Modified: 2021-02-14 04:22 UTC
From: marc dot fauser+php at fauser dot ag Assigned: cmb (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: master-Git-2014-09-02 (snap) OS: Windows 8.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marc dot fauser+php at fauser dot ag
New email:
PHP Version: OS:

 

 [2014-09-02 18:56 UTC] marc dot fauser+php at fauser dot ag
Description:
------------
I've reproduced this with 5.6.0 and older versions for windows.
It doesn't matter if it's x32 or x64 but only the thread safe version crashes.
It doesn't crash with nginx but with Apache 2.4.

I start php with the following command:
php-cgi.exe -b 127.0.0.1:9000

In Apache I configure my virtual host
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "c:/x/www"
    ServerName localhost
    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/C:/x/www/$1
</VirtualHost>

The first loading if a page works, every second request crashes php-cgi.exe

I've also tried it with a new module mod_proxy_handler and I get the same result
    <FilesMatch "\.php$">
        SetHandler proxy:fcgi://localhost:9000/
    </FilesMatch>

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

Expected result:
----------------
php-cgi.exe shouldn't crash.

Actual result:
--------------
php5ts.dll!_estrdup(const char * s) Line 2630	C
php5ts.dll!virtual_getcwd_ex(unsigned __int64 * length, void * * * tsrm_ls) Line 559	C
php5ts.dll!virtual_getcwd(char * buf, unsigned __int64 size, void * * * tsrm_ls) Line 568	C
php5ts.dll!tsrm_realpath(const char * path, char * real_path, void * * * tsrm_ls) Line 1971	C
php-cgi.exe!init_request_info(_fcgi_request * request, void * * * tsrm_ls) Line 1239	C
php-cgi.exe!main(int argc, char * * argv) Line 2138	C
php-cgi.exe!__tmainCRTStartup() Line 536	C



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-10 19:02 UTC] bukka@php.net
-Package: FPM related +Package: CGI/CLI related
 [2017-04-10 19:02 UTC] bukka@php.net
This is not fpm related
 [2021-02-04 17:12 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-02-04 17:12 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-02-14 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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 05:01:32 2024 UTC