{"id":738,"date":"2007-04-27T01:00:00","date_gmt":"2007-04-26T16:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2007-04-27-1.html"},"modified":"2007-04-27T01:00:00","modified_gmt":"2007-04-26T16:00:00","slug":"2007-04-27-1","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2007-04-27-1.html","title":{"rendered":"PHP \u7528\u30c7\u30d0\u30c3\u30ac"},"content":{"rendered":"<p>\n<a href=\"http:\/\/jp.php.net\/apd\">PHP: Advanced PHP Debugger(PHP)<\/a> (php.net)\n<\/p>\n<blockquote><p>(PHP \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3088\u308a\u5f15\u7528)<br \/>\nAPD \u306f\u9032\u5316\u3057\u305f PHP \u30c7\u30d0\u30c3\u30ac\u3067\u3059\u3002PHP \u30b3\u30fc\u30c9\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30ea\u30f3\u30b0\u3084 \u30c7\u30d0\u30c3\u30b0\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3001\u307e\u305f\u5b8c\u5168\u306a\u30b9\u30bf\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u51fa\u529b\u3059\u308b \u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n<\/p><\/blockquote>\n<p>&nbsp;<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806:\n<\/p>\n<blockquote><p>$ pecl install apd<br \/>\n&nbsp;<br \/>\n$ cat >> \/path\/to\/php.ini            \u2190 \u30a8\u30c7\u30a3\u30bf\u7b49\u3067\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092 php.ini \u306b\u8ffd\u52a0<br \/>\n&nbsp;<br \/>\nzend_extension = \/path\/to\/apd.so     \u2190 APD \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d5\u30eb\u30d1\u30b9(zend_extention \u6307\u5b9a\u306e\u5834\u5408\u306f\u76f8\u5bfe\u30d1\u30b9\u306f\u4e0d\u53ef)<br \/>\napd.dumpdir = \/tmp\/apd_log           \u2190 APD \u3067\u306e\u89e3\u6790\u7d50\u679c\u306e\u51fa\u529b\u5148\u30d5\u30a9\u30eb\u30c0<br \/>\napd.statement_tracing = 0            \u2190 \u884c\u5358\u4f4d\u30c8\u30ec\u30fc\u30b9\u3092\u3059\u308b\u5834\u5408 1 \u306b\u3059\u308b\u3002\u3053\u308c\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\u51fa\u529b\u304c\u5197\u9577\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p><\/blockquote>\n<p>Windows \u7528\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u6e08\u307f PECL \u30e2\u30b8\u30e5\u30fc\u30eb\u306f <a href=\"http:\/\/snaps.php.net\/win32\/\">http:\/\/snaps.php.net\/win32\/<\/a> \u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059(<a href=\"http:\/\/snaps.php.net\/win32\/pecl5.2-win32-latest.zip\">\u30d5\u30a1\u30a4\u30eb\u540d pecl \u304b\u3089\u306f\u3058\u307e\u308b\u3082\u306e<\/a>)\u3002<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n\u5229\u7528\u65b9\u6cd5:<br \/>\n\u30c7\u30d0\u30c3\u30b0\u3092\u3057\u305f\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4e00\u756a\u59cb\u3081\u306b\n<\/p>\n<blockquote><p>apd_set_pprof_trace();\n<\/p><\/blockquote>\n<p>\u3092\u547c\u3076\u3068 PHP \u30c7\u30d0\u30c3\u30ac\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\nPHP \u30c7\u30d0\u30c3\u30ac\u306b\u3088\u308b\u7d50\u679c\u306f php.ini \u306e apd.dumpdir \u3067\u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\n<\/p>\n<blockquote><p>pprof.<\u30d7\u30ed\u30bb\u30b9ID>.<\u901a\u3057\u756a\u53f7>\n<\/p><\/blockquote>\n<p>\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u305d\u306e\u307e\u307e\u8aad\u3081\u306a\u304f\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u8aad\u307f\u3084\u3059\u3044\u5f62\u306b\u6574\u5f62\u3059\u308b\u305f\u3081\u306b pprofp \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059(APD \u306b\u4ed8\u5c5e\u3057\u3066\u3044\u307e\u3059)\u3002<br \/>\n&nbsp;<br \/>\n&#8212; \u304b\u304b\u3063\u305f\u51e6\u7406\u6642\u9593\u306e\u591a\u3044\u95a2\u6570\u9806\u306b\u4e26\u3073\u304b\u3048\u3066\u51fa\u529b\u3059\u308b\n<\/p>\n<blockquote><p>pprofp -R [\u30d5\u30a1\u30a4\u30eb\u540d]\n<\/p><\/blockquote>\n<p>&#8212; \u30b3\u30fc\u30eb\u30c4\u30ea\u30fc(\u95a2\u6570\u306e\u5b9f\u884c\u9806\u5e8f)\u3092\u8abf\u3079\u308b\n<\/p>\n<blockquote><p>pprofp -t [\u30d5\u30a1\u30a4\u30eb\u540d]\n<\/p><\/blockquote>\n<p>&#8212; (\u4e0a\u306e\u4e8c\u3064)\uff0b(\u30d3\u30eb\u30c8\u30a4\u30f3\u95a2\u6570\u306f\u542b\u3081\u306a\u3044)\uff0b(\u30b3\u30fc\u30eb\u30c4\u30ea\u30fc\u306e\u6a2a\u306b\u7d4c\u904e\u6642\u9593\u3092\u8868\u793a)\n<\/p>\n<blockquote><p>pprofp -Rtci [\u30d5\u30a1\u30a4\u30eb\u540d]\n<\/p><\/blockquote>\n<p>&nbsp;<br \/>\n\u305d\u306e\u4ed6\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"https:\/\/www.ecoop.net\/memo\/2007-08-05-1.html\">APD \u306e pprofp \u5f15\u6570\u4e00\u89a7(pprofp -h)<\/a>\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n&nbsp;&nbsp;<br \/>\nWindows \u7528\u306e pprofp \u306b\u3064\u3044\u3066\u306f<a href=\"http:\/\/pecl.php.net\/package\/apd\">APD \u306e\u30bd\u30fc\u30b9<\/a>\u306b\u542b\u307e\u308c\u308b\u3082\u306e\u304c\u4f7f\u3048\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u307e\u307e\u306e\u5f62\u3067\u306f\u4f7f\u3044\u306b\u304f\u3044\u305f\u3081\u3001\u5b9f\u884c\u7528\u306e\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3082\u306e\u3092\u7f6e\u3044\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n<a href=\"https:\/\/www.ecoop.net\/downloads\/php\/php-apd_1.0.1-pprofp-win32.zip\">Windows \u5bfe\u5fdc pprofp \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><br \/>\n(APD 1.0.1 \u30bd\u30fc\u30b9\u4ed8\u5c5e\u306e\u3082\u306e\u304b\u3089\u4f5c\u6210) <br \/>\n&nbsp;<br \/>\n&#8211; pprofp<br \/>\n&#8211; pprofp.bat<br \/>\n&#8211; pprof2calltree<br \/>\n&#8211; pprof2calltree.bat<br \/>\n\u306e 4 \u30d5\u30a1\u30a4\u30eb\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\uff14\u30d5\u30a1\u30a4\u30eb\u3092\u305d\u306e\u307e\u307e php.exe \u3068\u540c\u3058\u5834\u6240\u306a\u3069\u9069\u5f53\u306b\u30d1\u30b9\u304c\u901a\u308b\u5834\u6240\u306b\u7f6e\u3044\u3066\u3054\u5229\u7528\u304f\u3060\u3055\u3044\u3002<br \/>\n&nbsp;<br \/>\n\u53c2\u8003:<br \/>\n&#8211; <a href=\"http:\/\/jp.php.net\/manual\/ja\/ref.apd.php\">APD<\/a>(\u516c\u5f0f PHP \u30de\u30cb\u30e5\u30a2\u30eb)<br \/>\n&#8211; <a href=\"http:\/\/blog.cles.jp\/item\/1093\">cles::blog<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP: Advanced PHP Debugger(PHP) (php.net) (PHP \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3088\u308a\u5f15\u7528) APD \u306f\u9032\u5316\u3057\u305f PHP \u30c7\u30d0\u30c3\u30ac\u3067\u3059\u3002PHP \u30b3\u30fc\u30c9\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30ea\u30f3\u30b0\u3084 \u30c7\u30d0\u30c3\u30b0\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2007-04-27-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">PHP \u7528\u30c7\u30d0\u30c3\u30ac<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[32],"class_list":["post-738","post","type-post","status-publish","format-standard","hentry","tag-php"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=738"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/738\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}