Re: [PHP-WIN] Re: Build and load Gmagick in PHP 7.0 on Windows 10,making Apache to stop service "[email protected]" <[email protected]>
[email protected] (Zom) Tue, 15 May 2018 19:52:34 -0700
| Newsgroups | php.windows |
|---|---|
| Message-ID | <[email protected]> |
Anatol Belski 於 4/22/2018 8:05 AM 寫道: > > >> -----Original Message----- >> From: Christoph M. Becker <[email protected]> >> Sent: Friday, April 20, 2018 7:44 PM >> To: [email protected]; [email protected] >> Subject: [PHP-WIN] Re: Build and load Gmagick in PHP 7.0 on Windows 10, >> making Apache to stop service >> >> On 20.04.2018 at 08:29, Zom wrote: >> >>> I built a gmagick extension for PHP 7.0 (VC14 x64 Thread Safe) on Windows 10. >>> PHP 7.0 is the only version I use. >>> >>> I followed the steps in >>> https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2and built >>> the php_gmagick.dll. Then I copied to the extension folder of php, >>> enabled it in php.ini, and restarted Apache. I tested the extentsion >>> by checking phpinfo.php from browser (chrome). It took a long time to >>> load until Apache stopped service automatically. If I disable gmagick >>> and restart Apache the phpinfo.php shows normally. >>> There is no requirement of Graphicsmagick and Gmagick version, so I >>> wonder if the version I picked might affect the building of extension. >>> >>> This is my building environment: >>> - Windows 10 Pro 64 bit >>> - Visual C++ 14.0 (Visual Studio 2015) >>> - PHP SDK downloaded fromhttps://github.com/OSTC/php-sdk-binary-tools >>> - PHP source (PHP 7.0 (7.0.29)) downloaded >>> fromhttps://windows.php.net/ >>> - PHP dependencies is fetched by calling phpsdk_deps -u >>> - Gmagick 2.0.4RC1 downloaded fromhttp://pecl.php.net/ >>> - Graphicsmagick 1.3.27 source downloaded from Graphicsmagick official >>> page >>> - I invoked phpsdk-vc14-x64.bat during the building process >>> >>> Is there anything wrong with the building environment?Where should I >>> look to troubleshooting? >>> Any other issues I should pay attention when building Gmagick on Windows? >> >> Having a backtrace[1] might be helpful. >> >> [1] <https://bugs.php.net/bugs-generating-backtrace-win32.php> >> > Perhaps it's just GraphicsMagick DLL not being on the path for the Apache process. Useful were to first start Apache on console, adding those dep dlls to the pth before. > > GraphicsMagick itself is unfortunately not a good build experience. I tried it several times with the latest versions and there's always some issue, fe it refuses to generate x64 projects, etc. Perhaps it's some issue on my side, though. > > Thanks > > Anatol > Thanks all. I have tried Christoph's suggestion of backtrace with Debug Diagnostic Tools. The log is strange and I don't understand why. Would like to seek for help, many thanks! Some extra environment information which maybe useful: - Apache is a Windows Binaries downloaded from Apache Lounge, v2.4.29, x64, VC15 (Visual Studio 2017) build. - PHP is downloaded from PHP.net, v7.0.26, x64, VC14 (Visual Studio 2015) build. - The deps GraphicsMagick libraries are built from VC14, choosing Dynamic Multi-threaded DLL runtimes in build configuration. First trial, I ran Debug Diagnostic Tools to monitor Apache Service without enabling Gmagick as comparison, the log is normal. I started Apache from Task Manager, the log shows that it loaded a list of files. When I stopped Apache Service from Task Manager, it unloaded the files. Second trial, I enable Gmagick in PHP and start Apache Service again. The log shows that Apache loaded a list of files as first trial, plus Gmagick and other files from GraphicsMagick without error. But soon, Apache kept loading and unloading all files (files as first trial plus Gmagick and other files from GraphicsMagick). After 22 minutes, Apache stopped itself. Here is part of the log showing Apache unloading and load files itself repeatedly. Full log is very log (123k of lines) Current Breakpoint List(BL) [5/15/2018 1:05:14 AM] Thread exited. Exiting thread - System ID: 15324. Exit code - 0x00000000 C:\php\ext\php_mysqli.dll Unloaded from 0xf25b0000 C:\php\ext\php_exif.dll Unloaded from 0xfd460000 C:\php\ext\php_mbstring.dll Unloaded from 0xdce60000 c:\graphicsmagick\CORE_RL_wand_.dll Unloaded from 0xef1c0000 c:\graphicsmagick\CORE_RL_ttf_.dll Unloaded from 0xef630000 c:\graphicsmagick\CORE_RL_lcms_.dll Unloaded from 0xef6d0000 c:\graphicsmagick\CORE_RL_bzlib_.dll Unloaded from 0xef770000 c:\graphicsmagick\CORE_RL_zlib_.dll Unloaded from 0xef730000 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9317_none_08e0939fa840d57b\MSVCR90.dll Unloaded from 0x69720000 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.openmp_1fc8b3b9a1e18e3b_9.0.21022.8_none_a5325551f9d85633\VCOMP90.DLL Unloaded from 0x69160000 c:\graphicsmagick\CORE_RL_magick_.dll Unloaded from 0xef500000 C:\php\ext\php_gmagick.dll Unloaded from 0xf4ad0000 C:\php\ext\php_gd2.dll Unloaded from 0xdada0000 C:\php\ext\php_fileinfo.dll Unloaded from 0xd8650000 C:\WINDOWS\SYSTEM32\SSPICLI.DLL Unloaded from 0x038d0000 C:\WINDOWS\SYSTEM32\secur32.dll Unloaded from 0xf6220000 C:\Apache24\libssh2.dll Unloaded from 0x80000000 C:\Apache24\bin\nghttp2.dll Unloaded from 0xf90e0000 C:\WINDOWS\System32\WLDAP32.dll Unloaded from 0x04e50000 C:\WINDOWS\System32\Normaliz.dll Unloaded from 0x06df0000 C:\php\ext\php_curl.dll Unloaded from 0xe7fb0000 C:\Apache24\SSLEAY32.dll Unloaded from 0xe66e0000 C:\Apache24\LIBEAY32.dll Unloaded from 0xda0f0000 C:\WINDOWS\System32\MSASN1.dll Unloaded from 0x03a40000 C:\WINDOWS\System32\CRYPT32.dll Unloaded from 0x04880000 C:\php\ext\php_openssl.dll Unloaded from 0xefb10000 C:\WINDOWS\System32\ole32.dll Unloaded from 0x06ca0000 [5/15/2018 1:05:15 AM] C:\WINDOWS\System32\PSAPI.DLL Unloaded from 0x04e40000 C:\php\php7ts.dll Unloaded from 0xcf940000 C:\php\php7apache2_4.dll Unloaded from 0x00a20000 C:\Apache24\modules\mod_setenvif.so Unloaded from 0x69490000 C:\Apache24\modules\mod_negotiation.so Unloaded from 0x694a0000 C:\Apache24\modules\mod_mime.so Unloaded from 0x694b0000 C:\Apache24\modules\mod_log_config.so Unloaded from 0x694c0000 C:\Apache24\modules\mod_isapi.so Unloaded from 0x694d0000 C:\Apache24\modules\mod_include.so Unloaded from 0x694e0000 C:\Apache24\modules\mod_env.so Unloaded from 0x69500000 C:\Apache24\modules\mod_dir.so Unloaded from 0x69510000 C:\Apache24\modules\mod_cgi.so Unloaded from 0x69520000 C:\Apache24\modules\mod_autoindex.so Unloaded from 0x69530000 C:\Apache24\modules\mod_authz_user.so Unloaded from 0x69540000 C:\Apache24\modules\mod_authz_host.so Unloaded from 0x69550000 C:\Apache24\modules\mod_authz_groupfile.so Unloaded from 0x69560000 C:\Apache24\modules\mod_authz_core.so Unloaded from 0x69570000 C:\Apache24\modules\mod_authn_file.so Unloaded from 0x69580000 C:\Apache24\modules\mod_authn_core.so Unloaded from 0x69590000 C:\Apache24\modules\mod_auth_basic.so Unloaded from 0x695a0000 C:\Apache24\modules\mod_asis.so Unloaded from 0x695b0000 C:\Apache24\modules\mod_allowmethods.so Unloaded from 0x695c0000 C:\Apache24\modules\mod_alias.so Unloaded from 0x695d0000 C:\Apache24\modules\mod_actions.so Unloaded from 0x695e0000 C:\Apache24\modules\mod_access_compat.so Unloaded from 0x695f0000 C:\Apache24\modules\mod_access_compat.so loaded at 0x695f0000 C:\Apache24\modules\mod_actions.so loaded at 0x695e0000 C:\Apache24\modules\mod_alias.so loaded at 0x695d0000 C:\Apache24\modules\mod_allowmethods.so loaded at 0x695c0000 C:\Apache24\modules\mod_asis.so loaded at 0x695b0000 C:\Apache24\modules\mod_auth_basic.so loaded at 0x695a0000 C:\Apache24\modules\mod_authn_core.so loaded at 0x69590000 C:\Apache24\modules\mod_authn_file.so loaded at 0x69580000 C:\Apache24\modules\mod_authz_core.so loaded at 0x69570000 C:\Apache24\modules\mod_authz_groupfile.so loaded at 0x69560000 C:\Apache24\modules\mod_authz_host.so loaded at 0x69550000 C:\Apache24\modules\mod_authz_user.so loaded at 0x69540000 C:\Apache24\modules\mod_autoindex.so loaded at 0x69530000 C:\Apache24\modules\mod_cgi.so loaded at 0x69520000 C:\Apache24\modules\mod_dir.so loaded at 0x69510000 C:\Apache24\modules\mod_env.so loaded at 0x69500000 C:\Apache24\modules\mod_include.so loaded at 0x694e0000 C:\Apache24\modules\mod_isapi.so loaded at 0x694d0000 C:\Apache24\modules\mod_log_config.so loaded at 0x694c0000 C:\Apache24\modules\mod_mime.so loaded at 0x694b0000 C:\Apache24\modules\mod_negotiation.so loaded at 0x694a0000 C:\Apache24\modules\mod_setenvif.so loaded at 0x69490000 C:\php\php7apache2_4.dll loaded at 0x00a20000 C:\php\php7ts.dll loaded at 0xcf940000 C:\WINDOWS\System32\ole32.dll loaded at 0x06ca0000 C:\WINDOWS\System32\PSAPI.DLL loaded at 0x04e40000 C:\php\ext\php_curl.dll loaded at 0xe7fb0000 C:\WINDOWS\System32\WLDAP32.dll loaded at 0x04e50000 C:\WINDOWS\System32\Normaliz.dll loaded at 0x06df0000 C:\Apache24\bin\nghttp2.dll loaded at 0xf90e0000 C:\Apache24\libssh2.dll loaded at 0x80000000 C:\Apache24\LIBEAY32.dll loaded at 0xda0f0000 C:\WINDOWS\System32\CRYPT32.dll loaded at 0x04880000 C:\Apache24\SSLEAY32.dll loaded at 0xe66e0000 C:\WINDOWS\System32\MSASN1.dll loaded at 0x03a40000 C:\php\ext\php_fileinfo.dll loaded at 0xd8650000 C:\php\ext\php_gd2.dll loaded at 0xdada0000 C:\php\ext\php_gmagick.dll loaded at 0xf4ad0000 c:\graphicsmagick\CORE_RL_wand_.dll loaded at 0xef1b0000 c:\graphicsmagick\CORE_RL_wand_.dll Unloaded from 0xef1b0000 c:\graphicsmagick\CORE_RL_magick_.dll loaded at 0xef1b0000 c:\graphicsmagick\CORE_RL_magick_.dll Unloaded from 0xef1b0000 c:\graphicsmagick\CORE_RL_wand_.dll loaded at 0xef1b0000 c:\graphicsmagick\CORE_RL_magick_.dll loaded at 0xef1e0000 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9317_none_08e0939fa840d57b\MSVCR90.dll loaded at 0x69720000 c:\graphicsmagick\CORE_RL_lcms_.dll loaded at 0xef320000 c:\graphicsmagick\CORE_RL_ttf_.dll loaded at 0xef500000 c:\graphicsmagick\CORE_RL_lcms_.dll Unloaded from 0xef320000 c:\graphicsmagick\CORE_RL_ttf_.dll Unloaded from 0xef500000 c:\graphicsmagick\CORE_RL_bzlib_.dll loaded at 0xef380000 c:\graphicsmagick\CORE_RL_bzlib_.dll Unloaded from 0xef380000 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.openmp_1fc8b3b9a1e18e3b_9.0.21022.8_none_a5325551f9d85633\VCOMP90.DLL loaded at 0x69160000 c:\graphicsmagick\CORE_RL_zlib_.dll loaded at 0xef320000 c:\graphicsmagick\CORE_RL_zlib_.dll Unloaded from 0xef320000 c:\graphicsmagick\CORE_RL_lcms_.dll loaded at 0xef320000 c:\graphicsmagick\CORE_RL_ttf_.dll loaded at 0xef500000 c:\graphicsmagick\CORE_RL_bzlib_.dll loaded at 0xef390000 c:\graphicsmagick\CORE_RL_zlib_.dll loaded at 0xef3d0000 C:\php\ext\php_mbstring.dll loaded at 0xdce60000 C:\php\ext\php_exif.dll loaded at 0xfd460000 C:\php\ext\php_mysqli.dll loaded at 0xf25b0000 C:\php\ext\php_openssl.dll loaded at 0xefb10000 C:\WINDOWS\SYSTEM32\secur32.dll loaded at 0xf6220000 C:\WINDOWS\SYSTEM32\SSPICLI.DLL loaded at 0x038d0000 C:\php\ext\php_mysqli.dll Unloaded from 0xf25b0000 C:\php\ext\php_exif.dll Unloaded from 0xfd460000 C:\php\ext\php_mbstring.dll Unloaded from 0xdce60000 c:\graphicsmagick\CORE_RL_wand_.dll Unloaded from 0xef1b0000 c:\graphicsmagick\CORE_RL_ttf_.dll Unloaded from 0xef500000 c:\graphicsmagick\CORE_RL_lcms_.dll Unloaded from 0xef320000 c:\graphicsmagick\CORE_RL_bzlib_.dll Unloaded from 0xef390000 c:\graphicsmagick\CORE_RL_zlib_.dll Unloaded from 0xef3d0000 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9317_none_08e0939fa840d57b\MSVCR90.dll Unloaded from 0x69720000 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.openmp_1fc8b3b9a1e18e3b_9.0.21022.8_none_a5325551f9d85633\VCOMP90.DLL Unloaded from 0x69160000 c:\graphicsmagick\CORE_RL_magick_.dll Unloaded from 0xef1e0000 C:\php\ext\php_gmagick.dll Unloaded from 0xf4ad0000 C:\php\ext\php_gd2.dll Unloaded from 0xdada0000