Comments (14)
I checked both the February release
https://github.com/win32service/win32service/releases/tag/v0.4.0
as the last build with PHP-7.3.6-TS-x64.
I also tried the official binary downloaded from https://windows.php.net/downloads/pecl/releases/win32service/
None of the binaries has given problems.
Can you give more information about your environment?
from win32service.
I accidentally stumbled across that as I was working on an OPcache bug, which required me to test development builds and release candidates. Despite OPcache, Wincache, and xDebug disabled, phpinfo(8) will fail. But, it will work if all extensions are active, EXCEPT win32service.
I'm using the 2019-02-20 build:
https://pecl.php.net/package/win32service/0.4.0/windows
which works fine with previous 7.3 and 7.2 versions.
But it DOES fail with the 7.3.7-RC3:
https://windows.php.net/qa/#php-7.3
per example, and had as well with a development build of 7.2.21-dev.
PS - to be clear, my PHP service that uses your extension continues to function just fine in each case. The problem is ONLY the phpinfo(8).
from win32service.
With PHP-7.3.7RC3-TS-x64 crash wen phpinfo () is invoked.
Attached test script.
win32service-crash.zip
from win32service.
Hi,
Thanks for your feedback. To search the solution, can you send me the PHP output when it crashes ?
from win32service.
I forgot to mention before - running phpinfo() from the php-cli command line does NOT cause problems. It only crashes when running FCGI (php-cgi).
First I fixed the test script, so that the php.exe and php.ini could be located in the "Program Files" folder (embedded space in path):
<?php
$php = PHP_BINARY;
$ini = '"'.php_ini_loaded_file().'"';
$iniopt = $ini ? "-c $ini" : '';
$iniopt .= extension_loaded('win32service') ? '' : ' -d extension=php_win32service.dll';
$command = "\"$php\" $iniopt -r \"phpinfo();\"";
exec($command, $output, $status);
var_dump($output, $status);
Then I ran your script on the command line - result is file "clioutput.txt".
clioutput.txt
No idea what your test script is attempting, but just in case here "phpinfo.cli.txt", which is the command line output of phpinfo().
phpinfo.cli.txt
However HERE are the RELEVANT files that are the CAUSE of the php-cgi crash. I ran phpinfo() using php-cgi.exe, first with win32service ACTIVE, and then with win32service removed. Please note the garbled HTTP header when win32service is ACTIVE:
phpinfo.cgi.html.txt
phpinfo.disabled.cgi.html.txt
phpinfo.cgi.html.zip
from win32service.
Hi,
Thanks for your feedback. To search the solution, can you send me the PHP output when it crashes ?
Here the side by side of the php-cgi.exe output. Notice the garbled "Content-Type" header in line 2 when win32service extension is loaded.
from win32service.
Result of my test in command line:
PHP version | Result for TS | result for NTS |
---|---|---|
PHP 7.2.20RC3 | ✔️ | ✔️ |
PHP 7.3.7RC3 | ✔️ | ✔️ |
Result with IIS:
PHP x64 version | Result for TS | result for NTS |
---|---|---|
PHP 7.3.6 | 🚫 | ✔️ |
PHP 7.3.7RC3 | 🚫 | ✖️ |
PHP 7.2.20RC3 | 🚫 | ✖️ |
PHP 7.2 snapshot | 🚫 | ✖️ |
from win32service.
Ok, what is your web server ? IIS ? Apache ?
The PHP build is: TS or NTS ?
from win32service.
Hi, IIS, NTS. However, I'm now able to produce the problem without using IIS. Opening a command window, I can use:
php-cgi -i >output.txt
and it will produce an INTACT content-header, even if win32service is active.
However, running:
php-cgi phpinfo.php >output2.txt
phpinfo.php.txt
will produce the garbled content-header.
So this completely rules out IIS or similar environmental factors. This is now plain-vanilla php-cgi.exe.
from win32service.
Hi,
Can you try with this build and send me the phpinfo html page ?
from win32service.
fixed.html.txt
Looks okay now: correct Content-Type header if running php-cgi in command line, and also if running from IIS.
from win32service.
okay, the problem come from the PHP version check. This check is necessary only for PHP 7.0.0 and 7.1.0.
I remove it.
The problem is only from the RC version or the snapshot.
from win32service.
You can download the version 0.4.1 from the artifact of AppVeyor at the end of build.
from win32service.
Thanks, 0.4.1 downloaded, rebooted, and PHP 7.3.7 phpinfo() working under IIS.
from win32service.
Related Issues (20)
- Pre-work the upgrade for PHP 8 HOT 4
- Characters encoding problems HOT 2
- Compilation for PHP7.4 in VC15 ? HOT 1
- 0.4.2 required for 7.4 - but labeled as "not for production" HOT 2
- Usage of win32_set_service_exit_code and win32_set_service_exit_mode HOT 7
- Use ValueError when function argument value is wrong
- Throw Exception if function return an error
- Remove specific code for older Windows version
- All example not work with V1
- Access Denied HOT 5
- Can't use in embed sapi HOT 3
- AppVeyor x86 build fail HOT 1
- Interact with Win32Services in a browser: ServiceAccessDeniedException HOT 4
- Missing win32 binaries on Github releases page HOT 3
- Access denied on service registration HOT 2
- New release supporting php 8.2 HOT 2
- Strange behavior on "pause" HOT 2
- PHP 8.2 support HOT 2
- Ability to define the 'dwControlsAccepted' parameter during service installation HOT 1
- PHP 8.3 support HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from win32service.