ProgrammingCaveman Posted October 15, 2020 Share Posted October 15, 2020 I've been working on Windows in PHP for many years using Zend Studio and Zend Debugger which is great. Now I'm trying to set this up on my Linux Kali installation and I'm having some problems with this. I have installed newest Apache 2.4.46 and PHP 7.4.x from debian repositories (using apt) (strangly the sub-version (x) was not the newest one!). After downloading Zend Debugger and configuring it in php.ini the debugger was not present in phpinfo(). The file downloaded from Zend website (https://www.zend.com/downloads/zend-studio-web-debugger) is named ZendDebugger-linux-x86_64/php-7.0.x/ZendDebugger.so and it doesn't work with PHP 7.4.x (very bad from Zend, isn't it? Or did I do something wrong?) Anyway I switched to PHP 7.0.x - also downloaded from apt and then the debugger showed up in phpinfo(). I have installed Zend Studio 13 and Firefox toolbar which is configured with default settings: broadcast port 20080 (clicking Test button shows OK). I run Zend Studio and click "Debug Current Page" in Firefox on some localhost PHP file with breakpoints set up and it doesn't work - instead I see standard "Connect has timed out" in Firefox - WHY? It looks like ports are not disabled on localhost, but I'm rather new to Linux so I may be wrong somewhere... Please help :-) What I added to php.ini : zend_extension=/usr/lib/php/ZendDebugger-linux-x86_64/php-7.0.x/ZendDebugger.so [zend_debugger] zend_debugger.allow_hosts=127.0.0.1 zend_debugger.allow_from_all=true zend_debugger.passive_mode_timeout=60 zend_debugger.expose_remotely=always Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/ Share on other sites More sharing options...
requinix Posted October 15, 2020 Share Posted October 15, 2020 Forget Zend Debugger. It's three years out of date and four releases of 7.x behind. Use Xdebug like everyone else. Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1581919 Share on other sites More sharing options...
ProgrammingCaveman Posted October 15, 2020 Author Share Posted October 15, 2020 I didn't ask for such advice. And I am not lame to use stuff like xDebug. I work with real time debugger. Anyone else? Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1581922 Share on other sites More sharing options...
requinix Posted October 15, 2020 Share Posted October 15, 2020 Yes, by all means, continue using a debugger that has clearly been abandoned and at a minimum does not work with any supported versions of PHP. It's definitely better for you to stick to the things you feel most comfortable with, even if that means working with a programming language that stopped receiving meaningful updates almost three years ago. It's not like the tech industry is constantly growing and evolving. It's unfortunate that Xdebug is too "lame" to support things like step-by-step debugging or code profiling or code coverage reporting. Really makes you wonder why anybody uses it at all, doesn't it? I bet if you searched Google for ways to debug PHP you wouldn't find a single result recommending Xdebug. 1 Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1581923 Share on other sites More sharing options...
ProgrammingCaveman Posted December 13, 2020 Author Share Posted December 13, 2020 I won't give up with this that easily... untill it WORKS. Anyone else here using Zend Debugger on Linux ?? Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583016 Share on other sites More sharing options...
ProgrammingCaveman Posted December 13, 2020 Author Share Posted December 13, 2020 (edited) You know what... I just had a look at that xDebug and it looks like it completely changed over the years... I remember few years ago it only supported some lame variable output to browser - like I was using print_r ... I will definately have a look at that. However still I think it would be much simpler if I could use this ZendDebugger. Edited December 13, 2020 by ProgrammingCaveman Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583017 Share on other sites More sharing options...
ProgrammingCaveman Posted December 13, 2020 Author Share Posted December 13, 2020 Okay, I followed this wizard: https://xdebug.org/wizard I did as it says (compiling from sources) but still I don't see xDebug in my phpinfo() ! Why? Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583019 Share on other sites More sharing options...
requinix Posted December 13, 2020 Share Posted December 13, 2020 Is the extension enabled? Does the php.ini setting to enable it use zend_extension= and not extension=? Anything in the error log about being able to load the extension? Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583021 Share on other sites More sharing options...
ProgrammingCaveman Posted December 13, 2020 Author Share Posted December 13, 2020 (edited) I enabled logging errors to a file and it doesn't show any errors. The extension is kept in /usr/lib/php/20190902 and it's the same dir which extension_dir in phpinfo() stands for. At the end of php.ini I have: zend_extension = xdebug.so So it should, at least theoretically, work. What did I do wrong? I didn't see any error while compiling from sources, but maybe the compilation went somehow wrong?? Edited December 13, 2020 by ProgrammingCaveman Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583027 Share on other sites More sharing options...
requinix Posted December 13, 2020 Share Posted December 13, 2020 It compilation didn't work then you wouldn't have an xdebug.so in the first place. Did you edit the correct php.ini or other settings files? Apache and php-fpm and php CLI all use different files. And any particular reason why you are doing all this yourself? If you installed PHP from Debian's repos then why not install Xdebug the same way? Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583029 Share on other sites More sharing options...
ProgrammingCaveman Posted December 13, 2020 Author Share Posted December 13, 2020 (edited) Fuck, good question... I didn't know xdebug is in Debian/Kali's repos. I edited right php.ini , I'm sure... what do you suggest to do now? I added the lines below to /etc/php/7.4/apache2 : zend_extension = xdebug.so xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.remote_autostart=1 xdebug.remote_mode=req Edited December 14, 2020 by ProgrammingCaveman Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583035 Share on other sites More sharing options...
requinix Posted December 14, 2020 Share Posted December 14, 2020 And you restarted Apache? And there's nothing in Apache's or PHP's error logs - just the normal startup messages? If that's still not working then it's going to be some minor thing somewhere. Or you could just ignore it all and install from the repo. Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583036 Share on other sites More sharing options...
ProgrammingCaveman Posted December 14, 2020 Author Share Posted December 14, 2020 Yes. I renamed the file xdebug.so and installed repo and it is now present in phpinfo() ! Now I will try to set it up working with Zend Studio and some browser plugin. Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583037 Share on other sites More sharing options...
ProgrammingCaveman Posted December 14, 2020 Author Share Posted December 14, 2020 Wow, it works! Thanks 🙂 1 Quote Link to comment https://forums.phpfreaks.com/topic/311605-zend-debugger-not-working-in-linux-kali-with-apache-and-zend-studio/#findComment-1583038 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.