Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用GD编译PHP在PPC Mac上使用EXC_断点(SIGTRAP)崩溃_Php_Macos_Gd - Fatal编程技术网

使用GD编译PHP在PPC Mac上使用EXC_断点(SIGTRAP)崩溃

使用GD编译PHP在PPC Mac上使用EXC_断点(SIGTRAP)崩溃,php,macos,gd,Php,Macos,Gd,首先,我应该说,我已经在整个互联网上搜索了这个问题,但我还没有找到任何解决方案 我有一个MacMiniPowerPC(PPC),我用PHP(5.4.0)运行ApacheWebServer(httpd-2.2.22),我自己做所有的配置和编译工作 如果配置为: “./配置“”--前缀=/usr/local/php5“”--mandir=/usr/share/man“”--infodir=/usr/share/info“”--sysconfdir=/etc“”--配置文件路径=/etc“”--配置z

首先,我应该说,我已经在整个互联网上搜索了这个问题,但我还没有找到任何解决方案

我有一个MacMiniPowerPC(PPC),我用PHP(5.4.0)运行ApacheWebServer(httpd-2.2.22),我自己做所有的配置和编译工作

如果配置为:
“./配置“”--前缀=/usr/local/php5“”--mandir=/usr/share/man“”--infodir=/usr/share/info“”--sysconfdir=/etc“”--配置文件路径=/etc“”--配置zlib“”--配置zlib dir=/usr“”--配置openssl=/usr“”--不配置iconv“”--启用exif“”--启用ftp“”--启用mbstring“”--启用mbregex“”--启用套接字“”--配置mysql=/usr/local/mysql”“--使用pdo mysql=/usr/local/mysql”“--使用mysqli=/usr/local/mysql/bin/mysql_config”“--使用-apxs2=/usr/local/apache2/bin/apxs”“--使用mcrypt”

那么PHP的工作就完美无缺了。但是如果我通过将这些添加到上面的脚本来添加GD模块:

“--使用gd”“--使用jpeg dir=/usr/local/lib”“--使用freetype dir=/usr/X11R6”“--使用png dir=/usr/X11R6”“--使用xpm dir=/usr/X11R6”

PHP的配置和编译没有任何错误,但当我请求调用PHP模块的页面时,它会导致EXC_断点(SIGTRAP)(参见下面的崩溃报告器日志)

很明显,与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 工艺:httpd[79852] 路径:/usr/local/apache2/bin/httpd 标识符:httpd 版本:???(???) 代码类型:PPC(本机) 父进程:httpd[79846] 日期/时间:2013-11-04 15:44:28.444+0200 操作系统版本:Mac OS X 10.5.8(9L31a) 报告版本:6 匿名UUID:0178B7F8-2241-43F7-A651-9E7234D41A37 异常类型:EXC_断点(SIGTRAP) 异常代码:0x0000000000000001、0x0000000093c11e0c 崩溃线程:0 特定于应用程序的信息: ***单线程过程分叉*** 线程0崩溃: 0 com.apple.CoreFoundation 0x93c11e0c\uu CFRunLoopFindMode+328 1 com.apple.CoreFoundation 0x93c13d88 CFRunLoopAddSource+276 2 com.apple.diskArbitation 0x901a6e8c DAApprovalSessionSchedule with RunLoop+52 3…ple.CoreServices.CarbonCore 0x9512e67c FSGetDiskArbSession(uu数据库会话**,uuu数据批准会话**)+540 4…ple.CoreServices.CarbonCore 0x9512e420 CreateDiskArbDiskForMountPath(字符常量*)+84 5…ple.CoreServices.CarbonCore 0x9512d2c8可缓存客户端\u GetVolumeCachedInfo(字符常量*、statfs常量*、CachedVolumeInfo*、\uuuuuDaDisk*、\uuuuuuuDaDisk**)+280 6…ple.CoreServices.CarbonCore 0x9512cca4装入卷(字符常量*,statfs*,无符号字符,无符号字符,uu DADisk*,短*)+352 7…ple.CoreServices.CarbonCore 0x9512ca48 MountInitialVolumes()+172 8…ple.CoreServices.CarbonCore 0x9512c4d4 INIT_FileManager()+164 9…ple.CoreServices.CarbonCore 0x9512c390 GetRetainedVolFSVCBByVolumeID(无符号长)+48 10…ple.CoreServices.CarbonCore 0x9512adf4 PathGetObjectInfo(字符常量*、无符号长、无符号长、卷信息**、无符号长*、无符号长*、字符*、无符号长*、无符号字符*)+184 11…ple.CoreServices.CarbonCore 0x9512acc4 FSPathMakeRefInternal(无符号字符常量*、无符号长、无符号长、FSRef*、无符号字符*)+64 12 libfreetype.6.dylib 0x0070a0fc FT_新_面_来自_资源+56 13 libfreetype.6.dylib 0x0070a3b0英尺新表面+48 14 libphp5.so 0x0118d1a8 fontFetch+824 15 libphp5.so 0x0118edac php_gd_gdCacheGet+220 16 libphp5.so 0x0118d6d8 php_gdu 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执行+776 22 libphp5.so 0x013f190c zend_execute_脚本+316 23 libphp5.so 0x013779f4 php_execute_脚本+596 24 libphp5.so 0x014bbe64 php_handler+1972 25 httpd 0x000020c0 ap_运行_处理程序+96 26 httpd 0x00006ae0 ap_调用_处理程序+224 27 httpd 0x000305c4 ap_过程_请求+116 28 httpd 0x0002c768 ap_进程_http_连接+104 29 httpd 0x00012d30 ap运行进程连接+96 30 httpd 0x00012ecc ap_过程_连接+92 31 httpd 0x000373e4辅联管+1220 32 httpd 0x000376a8 make_child+296 33 httpd 0x000377e4启动\u子级+100 34 httpd 0x000387d4 ap\U mpm\U运行+3988 35 httpd 0x0000a320干管+3280 36 httpd 0x000019c0启动+64
找到了问题的原因和解决方案:正如我所怀疑的,问题的原因是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”cxFlags=“-arch ppc-arch i386-arch ppc64-arch i386-pipe”cxFlags=“-arch x86_64-g-Os-pipe”LDFLAGS=“-arch ppc-ppc-arch ppc64-i386-arch x86-64-bindatload”。/config