php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81172 PHP 8.1alpha doesn't start as an Apache 2 module on Windows
Submitted: 2021-06-19 09:04 UTC Modified: 2021-06-19 10:40 UTC
From: manchokapitancho at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Apache2 related
PHP Version: 8.1.0alpha1 OS: Windows 10
Private report: No CVE-ID: None
 [2021-06-19 09:04 UTC] manchokapitancho at gmail dot com
Description:
------------
Tha alpha version of PHP 8.1 doesn't start as an Apache 2 module on Windows.
It works perfectly fine via CLI but not when configured to be used as an Apache 2 module.
Tried with the latest Apache 2.4.48 (Win64). I used the same configuration and the same php.ini file that work with PHP 8.0.6 and with PHP 8.0.8 RC1.


Test script:
---------------
1. Trying to access a resource using Apache
2. Checking the service name

Expected result:
----------------
1. It works
2. The service name is Apache/2.4.48 (Win64) PHP/8.1.0alpha

Actual result:
--------------
1. It doesn't work (timeout)
2. The service name is Apache/2.4.48 (Win64)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-19 09:42 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-06-19 09:42 UTC] cmb@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.
 [2021-06-19 09:53 UTC] manchokapitancho at gmail dot com
-Status: Feedback +Status: Assigned
 [2021-06-19 09:53 UTC] manchokapitancho at gmail dot com
This is not my first bug report and I don't see any additional information on the "how-to-report" page.

The error 
[Sat Jun 19 11:50:51.926123 2021] [mpm_winnt:notice] [pid 8348:tid 900] AH00428: Parent: child process 13996 exited with status 3221225477 -- Restarting.

is the only thing that is being reported by Apache, if this helps (9 times / request)
 [2021-06-19 10:12 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2021-06-19 10:12 UTC] cmb@php.net
That is at least something; now we know that a segfault occurs.
Please try to request a PHP info page, i.e.

    <?php phpinfo();

with a minimal php.ini (i.e. without loading any extensions). If
that works (it does for me), load additional extensions until the
crash occurs again.

If the minimal variant crashes right away, please double-check
that you load the PHP 8.1.0alpha1 php8apache2_4.dll, and that the
PATH is properly set.  Also, it might be neccessary to update your
MSVCRT.  If nothing helps, try to get a stack backtrace[1].

Also, do you use the x64 or the x86 build?

[1] <https://bugs.php.net/bugs-generating-backtrace-win32.php>
 [2021-06-19 10:30 UTC] manchokapitancho at gmail dot com
-Status: Feedback +Status: Closed
 [2021-06-19 10:30 UTC] manchokapitancho at gmail dot com
I think I should close this one despite getting a segfault instead of an error message. 

It seems that it was related to the PATH variable pointing to the wrong (old) PHP folder. Fixing the path resolved the issue.

Thank you for the hints and sorry for the wrong report!
 [2021-06-19 10:40 UTC] cmb@php.net
-Status: Closed +Status: Not a bug
 [2021-06-19 10:40 UTC] cmb@php.net
Great! :)
 [2022-02-03 19:13 UTC] jcastromail at yahoo dot es
I had the same problem (with the non-beta version).
Windows 10 64bits
Apache Lounge 2.4.52 64bits
PHP 8.1.2 64bits TS

And it refused to work.

I found the problem: the environment path.  I don't know if PHP or APACHE are to blame but it doesn't follow the path indicated in PHPIniDir to open the executable. It loads the executable from the environment path.

It is my configuration in httpd.conf

#PHPIniDir c:/server/php80
#LoadModule php_module "c:/server/php80/php8apache2_4.dll"

PHPIniDir c:/server/php81
LoadModule php_module "c:/server/php81/php8apache2_4.dll"

So, what I did? I changed the path to where is PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC