{"id":1053,"date":"2017-10-03T16:12:24","date_gmt":"2017-10-03T07:12:24","guid":{"rendered":"https:\/\/www.dogrow.net\/linux\/?p=1053"},"modified":"2018-04-14T00:45:11","modified_gmt":"2018-04-13T15:45:11","slug":"blog60","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/linux\/blog60\/","title":{"rendered":"(60)\u3010\u9023\u8f091-4\u3011eclipse + xdebug\u3067PHP\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30c3\u30b0"},"content":{"rendered":"<p>\u9023\u8f09\uff14\u56de\u76ee\u3001\u524d\u56de\u306e <a href=\"https:\/\/www.dogrow.net\/linux\/blog59\/\">\u300c(59)\u3010\u9023\u8f093\u3011VirtualBox\u4e0a\u306eUbuntu\u306bXdebug\u3092\u5165\u308c\u308b\u300d<\/a> \u306e\u7d9a\u304d\u3067\u3059\u3002<\/p>\n<h1 class=\"my_h\">\u3053\u306e\u9023\u8f09\u3067\u6700\u7d42\u7684\u306b\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>CentOS7\u3092\u5165\u308c\u305f\u7269\u7406\u30b5\u30fc\u30d0\u30fc\u306b VirtualBox\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001<br \/>\n\u3000VirtualBox\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u4e0a\u3067 Ubuntu\u306e\u4eee\u60f3\u30b5\u30fc\u30d0\u30fc\u3092\u52d5\u304b\u3057\u3001<br \/>\n\u3000\u3000Ubuntu\u306e\u4eee\u60f3\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067 WEB\u30b5\u30fc\u30d0\u30fc\u3092\u52d5\u304b\u3057\u3001<br \/>\n\u3000\u3000\u3000eclipse \uff0b xdebug, PhpStorm + xdebug\u3067\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30c3\u30b0\u3057\u305f\u3044\u3002<\/p>\n<h1 class=\"my_h\">\u4eca\u56de\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p><a href=\"https:\/\/www.dogrow.net\/linux\/blog57\/\">\u300c(57)\u3010\u9023\u8f091\u3011CentOS7\u306bVirtualBox\u3092\u5165\u308c\u308b\u300d\u3067\u306f\u3001<\/a><br \/>\nCentOS7\u3092\u5165\u308c\u305f\u7269\u7406\u30b5\u30fc\u30d0\u30fc\u306b VirtualBox\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001Ubuntu\u306e\u4eee\u60f3\u30b5\u30fc\u30d0\u30fc\u3092\u52d5\u304b\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.dogrow.net\/linux\/blog58\/\">\u300c(58)\u3010\u9023\u8f092\u3011VirtualBox\u4e0a\u306eUbuntu\u3092WEB\u30b5\u30fc\u30d0\u30fc\u306b\u3059\u308b\u300d\u3067\u306f\u3001<\/a><br \/>\n\u3053\u306eUbuntu\u3092 WEB\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u3044\u3001PHP\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u52d5\u304b\u3057\u3066MySQL\u3092\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.dogrow.net\/linux\/blog59\/\">\u300c(59)\u3010\u9023\u8f093\u3011VirtualBox\u4e0a\u306eUbuntu\u306bXdebug\u3092\u5165\u308c\u308b\u3002\u300d\u3067\u306f\u3001<\/a><br \/>\n\u3053\u306eUbuntu\u306b xdebug\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001<br \/>\nWindows\u30d1\u30bd\u30b3\u30f3\u306beclipse\u3092\u5165\u308c\u3066\u3001\u4eee\u60f3 Ubuntu\u4e0a\u3067\u52d5\u4f5c\u3059\u308bPHP\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30c7\u30d0\u30c3\u30b0\u3057\u3066\u307f\u308b\u3002<\/p>\n<p>\u30a4\u30e1\u30fc\u30b8\u3068\u3057\u3066\u306f\u3053\u3093\u306a\u611f\u3058\u3060\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image13.png\" alt=\"\" \/><\/p>\n<h1 class=\"my_h\">(1) \u5fc5\u8981\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<h3 class=\"my_h\">Windows\u30d1\u30bd\u30b3\u30f3\u306beclipse\u3092\u5165\u308c\u308b<\/h3>\n<p>1) Java SE\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff06\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n<a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jre9-downloads-3848532.html\" target=\"_blank\">http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jre9-downloads-3848532.html<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image8.png\" alt=\"\" \/><\/a><\/p>\n<p>Windows10 64bit\u7248\u306a\u3089\u3070 x64\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<\/p>\n<p>2) eclipse for PHP Developers\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff06\u89e3\u51cd\u3059\u308b\u3002<br \/>\n<a href=\"https:\/\/www.eclipse.org\/downloads\/packages\/eclipse-php-developers\/oxygen1\" target=\"_blank\">https:\/\/www.eclipse.org\/downloads\/packages\/eclipse-php-developers\/oxygen1<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image4-2.png\" alt=\"\" \/><\/a><\/p>\n<p>\u3044\u308f\u3086\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u3044\u3089\u306a\u3044\u3002<br \/>\n\u89e3\u51cd\u3057\u3066\u51fa\u73fe\u3057\u305f eclipse.exe \u3092\u5b9f\u884c\u3059\u308c\u3070 eclipse IDE\u304c\u4f7f\u3048\u308b\u3002<\/p>\n<h1 class=\"my_h\">(2) xdebug\u5074\u306e\u8a2d\u5b9a<\/h1>\n<p>\u524d\u56de\u306e <a href=\"https:\/\/www.dogrow.net\/linux\/blog59\/\">\u300c(59) VirtualBox\u4e0a\u306eUbuntu\u306bXdebug\u3092\u5165\u308c\u308b\u3002\u300d<\/a> \u306e\u8a2d\u5b9a\u3092\u4e00\u90e8\u5909\u66f4\u3059\u308b\u3002<br \/>\n<span class=\"my_fs_small1 my_fc_darkgray\">\u203b<a href=\"https:\/\/www.dogrow.net\/linux\/blog58\/\">\u524d\u3005\u56de\u306e\u6295\u7a3f<\/a>\u3067 PHP 7.0\u3092\u5165\u308c\u305f\u306e\u3067\u3001\u305d\u306e\u914d\u4e0b\u306e php.ini\u3092\u7de8\u96c6\u3059\u308b\u3002<\/span><\/p>\n<pre class=\"my_pre\">\r\nsudo vi \/etc\/php\/7.0\/apache2\/php.ini\r\n<\/pre>\n<p>Xdebug\u95a2\u9023\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\nxdebug.remote_host=192.168.1.12\r\n; xdebug.remote_port=9000\r\n; xdebug.idekey=\"XXXXXXXX\"\r\n<\/pre>\n<p><span class=\"my_fc_deeppink\">remote_host \u306bWindows\u30d1\u30bd\u30b3\u30f3\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\nremote_port \u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u3002<br \/>\nidekey \u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u3002<\/span><\/p>\n<p class=\"my_fs_small my_fc_red\" style=\"border: 1px #f00 solid;padding:5px\">\n\u3010\u4e0d\u660e\u70b9\u3011<br \/>\neclipse\u304cWEB\u30da\u30fc\u30b8\u3078\u306e\u30a2\u30af\u30bb\u30b9\u6642\u306b\u6b21\u306e\u3088\u3046\u306b\u5f15\u6570\u3092\u6e21\u3057\u3066\u3044\u308b\u3002<br \/>\n<span class=\"my_fc_blue my_fs_small1\">http:\/\/192.168.1.8\/php\/PhpTest\/index.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&#038;KEY=15070119744366<\/span><br \/>\n\u30fbXDEBUG_SESSION_START = ECLIPSE_DBGP<br \/>\n\u30fbKEY = 15070119744366<br \/>\n\u304c\u524a\u9664\u3057\u305f\u7269\u306b\u76f8\u5f53\u3059\u308b\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u5f8c\u65e5\u8abf\u67fb\u3059\u308b\u3002<\/p>\n<p>php.ini\u306e\u5909\u66f4\u3092\u53cd\u6620\u3055\u305b\u308b\u305f\u3081\u306b Apache2\u3092\u518d\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\nsudo systemctl restart apache2\r\nsudo systemctl status apache2\r\n<\/pre>\n<h1 class=\"my_h\" style=\"margin-top:2.5rem !important\">(3) eclipse\u5074\u306e\u8a2d\u5b9a<\/h1>\n<p>\u3053\u3053\u3067\u306f\u4e0b\u8a18\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3002\u3061\u3087\u3063\u3068\u53e4\u3044\u306a&#8230;<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image15.png\" alt=\"\" \/><\/p>\n<h3 class=\"my_h\">1. \u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/h3>\n<p>\u3053\u3053\u3067\u306f PhpTest \u306a\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u65b0\u898f\u4f5c\u6210\u3057\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306a\u5358\u7d14\u306aPHP\u30b3\u30fc\u30c9\u3092 index.php \u306b\u66f8\u3044\u305f\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image17.png\" alt=\"\" \/><\/p>\n<p>1) [Run]-[Debug Configurations]\u30e1\u30cb\u30e5\u30fc\u3092\u9078\u629e\u3059\u308b\u3002<\/p>\n<h3 class=\"my_h\">2. Debug configurations\u3092\u8a2d\u5b9a<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image19.png\" \/><\/p>\n<p>2) [PHP Web Page]\u3092\u9078\u629e\u3057\u305f\u72b6\u614b\u3067\u3001[New launch configuration]\u30dc\u30bf\u30f3\u3092\u62bc\u4e0b\u3059\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image21.png\" alt=\"\" \/><\/p>\n<p>3) Server\u5074\uff08\u4eca\u56de\u306f\u4eee\u60f3Ubuntu 192.168.1.8\uff09\u306e\u60c5\u5831\u3092\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\n\u524d\u56de\u306e\u6295\u7a3f\u3067\u30c7\u30d0\u30c3\u30ac\u306f XDebug\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u3067\u3053\u308c\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image22.png\" alt=\"\" \/><\/p>\n<p>[Configure&#8230;]\u306e\u4e2d\u8eab\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306a\u611f\u3058\u3002<\/p>\n<p>WEB\u30d6\u30e9\u30a6\u30b6\u304b\u3089<br \/>\n<span class=\"my_fc_blue\">http:\/\/192.168.1.8\/php\/PhpTest\/<\/span><br \/>\n\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001Ubuntu\u30b5\u30fc\u30d0\u30fc\u4e0a\u306e<br \/>\n<span class=\"my_fc_blue\">\/home\/hoge\/php\/PhpTest\/<\/span><br \/>\n\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3088\u3046\u306b\u3001\u4e8b\u524d\u306bWEB\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u8a2d\u5b9a\u6e08\u307f\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image23.png\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image24.png\" alt=\"\" \/><\/p>\n<h3 class=\"my_h\">3. \u30c7\u30d0\u30c3\u30b0\u5b9f\u884c<\/h3>\n<p>[\u866b\u30de\u30fc\u30af]\u3092\u62bc\u4e0b\u3057\u3001\u4e0a\u8a182)\u3067\u4f5c\u6210\u3057\u305f\u30c7\u30d0\u30c3\u30ac\u3092\u9078\u629e\u3059\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image2-1.png\" alt=\"\" \/><\/p>\n<p>\u5f8c\u306f\u4ed6\u306e\u8a00\u8a9e\u306e\u5834\u5408\u3068\u540c\u3058\u3002<br \/>\n\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\u3057\u305f\u308a\u3001\u5909\u6570\u5024\u3092\u898b\u305f\u308a\u3001\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u3057\u305f\u308a\u3067\u304d\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2017\/10\/Image26.png\" alt=\"\" \/><\/p>\n<p>\u81ea\u5206\u306e\u5834\u5408 PHP\u3067\u306f\u305d\u3093\u306a\u306b\u5927\u304d\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304b\u306a\u3044\u306e\u3067 var_dump\u30c7\u30d0\u30c3\u30b0\u3067\u5341\u5206\u3060\u3063\u305f\u3002<br \/>\n\u4eca\u56de\u69cb\u7bc9\u3057\u305f\u74b0\u5883\u304c\u3044\u3064\u304b\u5f79\u306b\u7acb\u3064\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>\u9023\u8f09\uff14\u56de\u76ee\u3001\u524d\u56de\u306e \u300c(59)\u3010\u9023\u8f093\u3011VirtualBox\u4e0a\u306eUbuntu\u306bXdebug\u3092\u5165\u308c\u308b\u300d \u306e\u7d9a\u304d\u3067\u3059\u3002 \u3053\u306e\u9023\u8f09\u3067\u6700\u7d42\u7684\u306b\u3084\u308a\u305f\u3044\u3053\u3068 CentOS7\u3092\u5165\u308c\u305f\u7269\u7406\u30b5\u30fc\u30d0\u30fc\u306b VirtualBox\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/linux\/blog60\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83,82,79],"tags":[],"class_list":["post-1053","post","type-post","status-publish","format-standard","hentry","category-debug","category-eclipse","category-php"],"views":11644,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/1053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/comments?post=1053"}],"version-history":[{"count":33,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/1053\/revisions"}],"predecessor-version":[{"id":1411,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/1053\/revisions\/1411"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/media?parent=1053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/categories?post=1053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/tags?post=1053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}