{"id":643,"date":"2020-05-04T20:42:37","date_gmt":"2020-05-04T18:42:37","guid":{"rendered":"http:\/\/chrigi.me\/wordpress\/?p=643"},"modified":"2020-05-04T20:43:09","modified_gmt":"2020-05-04T18:43:09","slug":"installation-eclipse-pdt-xampp-php-mysql-xdebug","status":"publish","type":"post","link":"https:\/\/chrigi.me\/wordpress\/installation-eclipse-pdt-xampp-php-mysql-xdebug\/","title":{"rendered":"Installation Eclipse PDT, XAMPP (PHP &#038; MySQL), XDebug"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">XAMPP<\/h2>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>Install XAMPP (<a href=\"https:\/\/www.apachefriends.org\/de\/index.html\">https:\/\/www.apachefriends.org\/de\/index.html<\/a>) to the directory &#8222;C:\/xampp&#8220; <\/li><li>Open Config of Apache (File: httpd.conf)<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"432\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-1.png\" alt=\"\" class=\"wp-image-644\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-1.png 664w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-1-300x195.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-1-624x406.png 624w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter the root directory of the web server (localhost) at DocumentRoot<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>e.g. \nDocumentRoot \"D:\\05_Insomnia\\Humor Nacht\\TicketSystem\" \n&lt;Directory \"D:\\05_Insomnia\\Humor Nacht\\TicketSystem\"><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Open Shell in XAMPP Control Panel<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"429\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-2.png\" alt=\"\" class=\"wp-image-645\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-2.png 661w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-2-300x195.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-2-624x405.png 624w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Run the command:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>php -i > phpversion.txt<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Open <em>&#8222;C:\\xampp\\phpversion.txt&#8220;<\/em> in a text editor<\/li><li>Copy the whole content of the file<\/li><li>Go to the website <a href=\"https:\/\/xdebug.org\/wizard.php\">https:\/\/xdebug.org\/wizard.php<\/a>&nbsp;to find the correct xdebug version<\/li><li>Paste the content of the file and click the &#8222;Analyze my phpinfo() output&#8220; button.<\/li><li>A download link is generated with the right XDebug version for XAMPP.<\/li><li>Download&nbsp;<em>php_xdebug-xxxxxxxxxxxx.dll<\/em><\/li><li>Move the downloaded file to&nbsp;&#8222;<em>C:\\xampp\\php\\ext&#8220;<\/em><\/li><li>Edit&nbsp;<em>&#8222;C:\\xampp\\php\\php.ini&#8220;&nbsp;<\/em>and add the lines:<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[Xdebug]\nzend_extension = C:\\xampp\\php\\ext\\php_xdebug-xxxxxxxxxxxx .dll\nxdebug.remote_enable=1\nxdebug.remote_port=9000\n<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Restart Apache by click stop and start in the XAMPP Control Panel<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Set password for root user<\/h3>\n\n\n\n<p>By default, when you install XAMPP, the&nbsp;password of the &#8222;root&#8220; user for  MySQL is not set. But it is recommended to set one to protect your database.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Start the Apache Server and MySQL from the XAMPP control panel<\/li><li>Open the Admin Panel of Mysql by clicking on &#8222;Admin&#8220;-Button under MySQL or open <a href=\"http:\/\/localhost\/phpmyadmin\/\">http:\/\/localhost\/phpmyadmin\/<\/a><\/li><li>Select the SQL tab to enter a SQL querys.<\/li><li>Enter the following querries. Replace &#8217;new_mysql_password&#8216; with youtr password and click the Go Button<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_mysql_password';\nALTER USER 'root'@'127.0.0.1' IDENTIFIED BY 'new_mysql_password';<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Now you will see a message saying that the query has been executed successfully.<\/li><li>If you refresh the page, you will be getting a error message. This is because the phpMyAdmin configuration file is not aware of our newly set root password. To set this we have to modify the phpMyAdmin config file.<\/li><li>Therforce go to the XAMPP Control panel and click on the Config-Button under Apache. Choose the config file <em>&#8222;config.inc.php&#8220;<\/em> (or open <em>C:\\xampp\\phpMyAdmin\\config.inc.php<\/em>)<\/li><li>Search the string <em>$cfg[&#8218;Servers&#8216;][$i][&#8218;password&#8216;] = &#8220;; <\/em>and change it to <em>$cfg[&#8218;Servers&#8216;][$i][&#8218;password&#8216;] = &#8217;new_mysql_password&#8216;;<\/em>&nbsp;<\/li><li>Set also $cfg[&#8218;Servers&#8216;][$i][&#8218;AllowNoPassword&#8216;] = false;<\/li><li>Save the <em>config.inc.php<\/em> file and restart the XAMPP server. (stop and start)<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Import existing database<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Export the database that you want to import (perhaps from an existing website)<\/li><li>Use the SQL format<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"395\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-8-1024x395.png\" alt=\"\" class=\"wp-image-651\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-8-1024x395.png 1024w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-8-300x116.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-8-768x296.png 768w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-8-624x241.png 624w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-8.png 1152w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Start the Apache Server and MySQL from the XAMPP control panel<\/li><li>Open the Admin Panel of Mysql by clicking on &#8222;Admin&#8220;-Button under MySQL or open <a href=\"http:\/\/localhost\/phpmyadmin\/\">http:\/\/localhost\/phpmyadmin\/<\/a><\/li><li>Select the Import tab<\/li><li>Select the exported Database that you want to import<\/li><li>Click OK to import the database<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"761\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-9-1024x761.png\" alt=\"\" class=\"wp-image-652\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-9-1024x761.png 1024w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-9-300x223.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-9-768x570.png 768w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-9-624x464.png 624w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-9.png 1147w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Eclipse PDT<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Download Eclipse Installer from <a href=\"https:\/\/www.eclipse.org\/\">https:\/\/www.eclipse.org\/<\/a><\/li><li>Start the installer and choose <em>Eclipse IDE for PHP Developers<\/em><\/li><li>Open Eclipse <\/li><li>Create a new PHP Project or open an existing Project<\/li><li>Open the project properties by a right click on the project in the Project Explorer<\/li><li>Select the preferred PHP Version under PHP &#8211;&gt; Validation<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"573\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-3.png\" alt=\"\" class=\"wp-image-646\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-3.png 785w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-3-300x219.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-3-768x561.png 768w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-3-624x455.png 624w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Edit the PHP Server<\/li><li>Therefore, open Preferences of Eclipse (Window &#8211;&gt; Preferences) <\/li><li>Select Servers under PHP and press to Edit<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"535\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-4.png\" alt=\"\" class=\"wp-image-647\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-4.png 632w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-4-300x254.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-4-624x528.png 624w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>In the server tap you can enter the base url and document root, if the localhost of the Apache web server is not set directly to this project.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"471\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-5.png\" alt=\"\" class=\"wp-image-648\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-5.png 509w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-5-300x278.png 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>The the debugger tab, you can set the debugger (Xdebug on Port 9000)<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"472\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-6.png\" alt=\"\" class=\"wp-image-649\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-6.png 509w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-6-300x278.png 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>In the path mapping you can set the project path relative to the document root<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"369\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-7.png\" alt=\"\" class=\"wp-image-650\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-7.png 508w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Eclipse-PDT-Installation-7-300x218.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>If all is configured correctly. You can right-click on a php file in the project explorer and click Run as &#8211;&gt; PHP Web Application<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"500\" src=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Screenshot-2020-05-04-20.34.27.png\" alt=\"\" class=\"wp-image-655\" srcset=\"https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Screenshot-2020-05-04-20.34.27.png 734w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Screenshot-2020-05-04-20.34.27-300x204.png 300w, https:\/\/chrigi.me\/wordpress\/wp-content\/uploads\/2020\/05\/Screenshot-2020-05-04-20.34.27-624x425.png 624w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>The correct path should be displayed in the window that is opened.<\/li><li>When pressing ok, the executed php File should showed in a browser<\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>XAMPP Install XAMPP (https:\/\/www.apachefriends.org\/de\/index.html) to the directory &#8222;C:\/xampp&#8220; Open Config of Apache (File: httpd.conf) Enter the root directory of the web server (localhost) at DocumentRoot Open Shell in XAMPP Control Panel Run the command: Open &#8222;C:\\xampp\\phpversion.txt&#8220; in a text editor Copy the whole content of the file Go to the&#8230; <a href=\"https:\/\/chrigi.me\/wordpress\/installation-eclipse-pdt-xampp-php-mysql-xdebug\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":645,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"categories":[12,15],"tags":[],"class_list":["post-643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-konfigurationen","category-php"],"_links":{"self":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/comments?post=643"}],"version-history":[{"count":4,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/643\/revisions"}],"predecessor-version":[{"id":657,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/643\/revisions\/657"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/media\/645"}],"wp:attachment":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/media?parent=643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/categories?post=643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/tags?post=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}