首先,我应该说我已经在整个互联网上搜索了这个问题,但我找不到任何解决方案。
我有一个Mac mini PowerPC(PPC),我用PHP(5.4.0)运行Apache webserver(httpd-2.2.22),我做了所有的配置和放大器。自己编译工作。
如果配置:
'./configure'' - prefix = / usr / local / php5'' - mandir = / usr / share / man'' - infodir = / usr / share / info'' - sysconfdir = / etc'' --with-config-file-path = / etc'' - with-zlib'' - with-zlib-dir = / usr'' - with-openssl = / usr'' - without-iconv'' --enable-exif'' - enable-ftp'' - enable-mbstring'' - enable-mbregex'' - enable-sockets'' - with-mysql = / usr / local / mysql'' - -with-pdo-mysql = / usr / local / mysql'' - with-mysqli = / usr / local / mysql / bin / mysql_config'' - with-apxs2 = / usr / local / apache2 / bin / apxs' '--with-mcrypt的'
然后PHP完美无缺。但是如果我通过在上面的脚本中添加GD模块来添加GD模块:
' - with-gd'' - with-jpeg-dir = / usr / local / lib'' - with-freetype-dir = / usr / X11R6'' - with-png-dir = / usr / X11R6'' - with-xpm-dir = / usr / X11R6'
PHP在没有任何错误的情况下进行配置和编译,但是当我请求调用PHP模块的页面时,它会导致EXC_BREAKPOINT(SIGTRAP)(请参阅下面的Crash Reporter日志)。
显然,与GD模块相关的东西导致了这个问题,可能是FreeType模块,因为它存在于日志中,但当然可能不确定。
当PHP崩溃(或更准确地说,httpd)时,CPU会以100%的速度持续10到15秒直到它恢复。
我需要使用GD模块并保留Mac mini PowerPC。那么,我该怎么做才能解决这个问题呢?
Process: httpd [79852] Path: /usr/local/apache2/bin/httpd Identifier: httpd Version: ??? (???) Code Type: PPC (Native) Parent Process: httpd [79846] Date/Time: 2013-11-04 15:44:28.444 +0200 OS Version: Mac OS X 10.5.8 (9L31a) Report Version: 6 Anonymous UUID: 0178B7F8-2241-43F7-A651-9E7234D41A37 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x0000000093c11e0c Crashed Thread: 0 Application Specific Information: *** single-threaded process forked *** Thread 0 Crashed: 0 com.apple.CoreFoundation 0x93c11e0c __CFRunLoopFindMode + 328 1 com.apple.CoreFoundation 0x93c13d88 CFRunLoopAddSource + 276 2 com.apple.DiskArbitration 0x901a6e8c DAApprovalSessionScheduleWithRunLoop + 52 3 ...ple.CoreServices.CarbonCore 0x9512e67c _FSGetDiskArbSession(__DASession**, __DAApprovalSession**) + 540 4 ...ple.CoreServices.CarbonCore 0x9512e420 CreateDiskArbDiskForMountPath(char const*) + 84 5 ...ple.CoreServices.CarbonCore 0x9512d2c8 FSCacheableClient_GetVolumeCachedInfo(char const*, statfs const*, CachedVolumeInfo*, __DADisk*, __DADisk**) + 280 6 ...ple.CoreServices.CarbonCore 0x9512cca4 MountVolume(char const*, statfs*, unsigned char, unsigned char, __DADisk*, short*) + 352 7 ...ple.CoreServices.CarbonCore 0x9512ca48 MountInitialVolumes() + 172 8 ...ple.CoreServices.CarbonCore 0x9512c4d4 INIT_FileManager() + 164 9 ...ple.CoreServices.CarbonCore 0x9512c390 GetRetainedVolFSVCBByVolumeID(unsigned long) + 48 10 ...ple.CoreServices.CarbonCore 0x9512adf4 PathGetObjectInfo(char const*, unsigned long, unsigned long, VolumeInfo**, unsigned long*, unsigned long*, char*, unsigned long*, unsigned char*) + 184 11 ...ple.CoreServices.CarbonCore 0x9512acc4 FSPathMakeRefInternal(unsigned char const*, unsigned long, unsigned long, FSRef*, unsigned char*) + 64 12 libfreetype.6.dylib 0x0070a0fc FT_New_Face_From_Resource + 56 13 libfreetype.6.dylib 0x0070a3b0 FT_New_Face + 48 14 libphp5.so 0x0118d1a8 fontFetch + 824 15 libphp5.so 0x0118edac php_gd_gdCacheGet + 220 16 libphp5.so 0x0118d6d8 php_gd_gdImageStringFTEx + 360 17 libphp5.so 0x011763c0 php_imagettftext_common + 1504 18 libphp5.so 0x01176494 zif_imagefttext + 20 19 libphp5.so 0x014b9c68 zend_do_fcall_common_helper_SPEC + 1048 20 libphp5.so 0x01452898 _ZEND_DO_FCALL_SPEC_CONST_HANDLER + 440 21 libphp5.so 0x014ba878 execute + 776 22 libphp5.so 0x013f190c zend_execute_scripts + 316 23 libphp5.so 0x013779f4 php_execute_script + 596 24 libphp5.so 0x014bbe64 php_handler + 1972 25 httpd 0x000020c0 ap_run_handler + 96 26 httpd 0x00006ae0 ap_invoke_handler + 224 27 httpd 0x000305c4 ap_process_request + 116 28 httpd 0x0002c768 ap_process_http_connection + 104 29 httpd 0x00012d30 ap_run_process_connection + 96 30 httpd 0x00012ecc ap_process_connection + 92 31 httpd 0x000373e4 child_main + 1220 32 httpd 0x000376a8 make_child + 296 33 httpd 0x000377e4 startup_children + 100 34 httpd 0x000387d4 ap_mpm_run + 3988 35 httpd 0x0000a320 main + 3280 36 httpd 0x000019c0 start + 64
答案 0 :(得分:0)
问题的原因和解决方案是:我怀疑,问题的原因是FreeType,或者更确切地说是它与Apple.CoreServices.CarbonCore的关系,解决方案是将FreeType与CarbonCode分离,这是怎么回事完了:
重新配置FreeType库,如下所示:
MACOSX_DEPLOYMENT_TARGET = 10.5 CFLAGS =“ - arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp”CCFLAGS =“ - arch ppc -arch ppc64 -arch i386 -arch x86_64 - g -Os -pipe“CXXFLAGS =” - arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe“LDFLAGS =” - arch ppc -arch ppc64 -arch i386 -arch x86_64 -bindatload“./ configure << strong> - with-fsspec = no --with-fsref = no --with-quickdraw-toolbox = no --with-quickdraw-carbon = no
注意最后的“no”选项,它们将FT与CC分离。我不知道前面的LDFLAGS和-bindatload表达式是否必要,但我把它们按原样放置。
在重新配置和一般的PHP重新编译之后,GD扩展开始完美运行。