{"id":12299,"date":"2024-11-18T13:47:07","date_gmt":"2024-11-18T13:47:07","guid":{"rendered":"https:\/\/myprojects.advchaweb.com\/?p=12299"},"modified":"2024-11-19T03:19:59","modified_gmt":"2024-11-19T03:19:59","slug":"install-xdebug-with-php-8-2-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2024\/11\/18\/install-xdebug-with-php-8-2-on-ubuntu-22-04\/","title":{"rendered":"Install xdebug with PHP 8.2 on Ubuntu 22.04"},"content":{"rendered":"<p>&lt;OLD&gt;Ref: https:\/\/gist.github.com\/henryonsoftware\/066d8282daaf8c2ae281ce010e3e5404<\/p>\n<p>1. Download xdebug source code from https:\/\/github.com\/xdebug\/xdebug\/releases<br \/>\nfor example the xdebug 3.3.2 from https:\/\/github.com\/xdebug\/xdebug\/archive\/refs\/tags\/3.3.2.tar.gz<\/p>\n<p>2. extract the downloaded file<br \/>\nsatria@teddy:~$ cd Downloads\/<br \/>\nsatria@teddy:~\/Downloads$ tar -xvzf xdebug-3.3.2.tar.gz<\/p>\n<p>3. run &#8216;phpize&#8217;<br \/>\nsatria@teddy:~\/Downloads$ cd xdebug-3.3.2\/<br \/>\nsatria@teddy:~\/Downloads\/xdebug-3.3.2$ phpize<br \/>\nConfiguring for:<br \/>\nPHP Api Version: 20210902<br \/>\nZend Module Api No: 20210902<br \/>\nZend Extension Api No: 420210902<br \/>\nconfigure.ac:165: warning: The macro `AC_PROG_LIBTOOL&#8217; is obsolete.<br \/>\nconfigure.ac:165: You should run autoupdate.<br \/>\nbuild\/libtool.m4:99: AC_PROG_LIBTOOL is expanded from&#8230;<br \/>\nconfigure.ac:165: the top level<\/p>\n<p>4. run &#8216;.\/configure&#8217;<br \/>\nsatria@teddy:~\/Downloads\/xdebug-3.3.2$ .\/configure<\/p>\n<p>5. run &#8216;make&#8217;<br \/>\nsatria@teddy:~\/Downloads\/xdebug-3.3.2$ make<\/p>\n<p>6. copy the module xdebug.so to php lib 20210902<br \/>\n&lt;\/OLD&gt;<br \/>\n&lt;NEW&gt;<\/p>\n<p>Use php from repository <code>ppa:ondrej\/php<\/code><br \/>\nthen install php8.2-dev<br \/>\n[codesyntax lang=&#8221;php&#8221;]<\/p>\n<pre>sudo add-apt-repository ppa:ondrej\/php\r\nsudo apt update\r\nsudo apt install php8.2-dev<\/pre>\n<p>[\/codesyntax]<\/p>\n<p>then install php8.2-xdebug<br \/>\n[codesyntax lang=&#8221;php&#8221;]<\/p>\n<pre>satria@teddy:~$ sudo apt-get install php8.2-xdebug<\/pre>\n<p>[\/codesyntax]<\/p>\n<p>check the php version<br \/>\n[codesyntax lang=&#8221;php&#8221;]<\/p>\n<pre>satria@teddy:~$ php -v\r\nPHP 8.2.25 (cli) (built: Oct 30 2024 11:25:56) (NTS)\r\nCopyright (c) The PHP Group\r\nZend Engine v4.2.25, Copyright (c) Zend Technologies\r\n    with Zend OPcache v8.2.25, Copyright (c), by Zend Technologies\r\n    with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans<\/pre>\n<p>[\/codesyntax]<\/p>\n<p>if not php8.2, you can select it by using<br \/>\n[codesyntax lang=&#8221;php&#8221;]<\/p>\n<pre>satria@teddy:~$ sudo update-alternatives --config php<\/pre>\n<p>[\/codesyntax]<\/p>\n<p>CONFIG XDEBUG<\/p>\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/php\/8.2\/apache2\/conf.d\/20-xdebug.ini<\/pre>\n<p>SETTING<\/p>\n<pre class=\"lang:default decode:true\">zend_extension=xdebug.so\r\nxdebug.mode= debug \r\nxdebug.start_with_request = yes \r\nxdebug.var_display_max_data = 1024\r\nxdebug.var_display_max_children = 512 \r\nxdebug.var_display_max_depth = 6<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;OLD&gt;Ref: https:\/\/gist.github.com\/henryonsoftware\/066d8282daaf8c2ae281ce010e3e5404 1. Download xdebug source code from https:\/\/github.com\/xdebug\/xdebug\/releases for example the xdebug 3.3.2 from https:\/\/github.com\/xdebug\/xdebug\/archive\/refs\/tags\/3.3.2.tar.gz 2. extract the downloaded file satria@teddy:~$ cd Downloads\/ satria@teddy:~\/Downloads$ tar -xvzf xdebug-3.3.2.tar.gz 3. run &#8216;phpize&#8217; satria@teddy:~\/Downloads$ cd xdebug-3.3.2\/ satria@teddy:~\/Downloads\/xdebug-3.3.2$ phpize Configuring for: PHP Api Version: 20210902 Zend Module Api No: 20210902 Zend Extension Api No: 420210902 configure.ac:165: warning: The &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2024\/11\/18\/install-xdebug-with-php-8-2-on-ubuntu-22-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install xdebug with PHP 8.2 on Ubuntu 22.04&#8221;<\/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":[48,132],"tags":[],"class_list":["post-12299","post","type-post","status-publish","format-standard","hentry","category-php-2","category-ubuntu-22-04"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/12299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=12299"}],"version-history":[{"count":5,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/12299\/revisions"}],"predecessor-version":[{"id":12301,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/12299\/revisions\/12301"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=12299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=12299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=12299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}