I am trying to load XDebug & ionCube loader simultaneously, when I type zend_extension_ts="path/to/ioncube_loader_win_5.2.dll" or zend_extension_ts="path/to/php_xdebug.dll" alone in php.ini they work. But I cant get them working simultaneously. Is there any way I can load them both ?
I was thinking if I can load them only for particular directory/project, I don't know if it is possible.
Xdebug is not compatible with ioncube: http://xdebug.org/docs/install#compat You can not have them both installed in the same server environment, so you'll have to set-up two server instances (or use lighttpd/nginx with two fast-cgi configurations) as I have described here: http://derickrethans.nl/multiple-php-versions.html
I have installed ionCube successfully on the top of Zend debugger without running into any issues,
To Install ionCube, I have downloaded the zip file for my OS from here
then I ran the localhost/ioncube/loader-wizard.php, it will tell you step by step what to do, for me because I have windows and wamp server I had to insert the ioncube folder in
C:\wamp\bin\apache\apache2.4.9\bin\
here is the php version and explanation:
PHP 5.5.12 (cli) (built: Apr 30 2014 11:20:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
I saw in other stackoverflow post mentioned by Arte Arefjev that the zend_extention of ioncube should be the first one to load so I did this:
zend_extension = "C:/wamp/bin/apache/apache2.4.9/bin/ioncube/ioncube_loader_win_5.5.dll"
zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
all my debugger and at the same time my ioncube is working fabulous!
Hope it will help someone in the future.
For me it seems to work with php 5.3.10 as it says
with the ionCube PHP Loader v4.2.1, Copyright (c) 2002-2012, by ionCube Ltd., and
with Xdebug v2.2.0rc1, Copyright (c) 2002-2012, by Derick Rethans
but i havent tested debugging with files containing ioncube encoded content yet.
Related
I've recently had to swap over to a MacOS for development. Previously I had Xdebug running fine and it's such a massive help that I want to use is again.
I followed the Mac/homebrew instructions here: https://xdebug.org/docs/install#pecl with some more information that I found here: https://xdebug.org/docs/install#configure-php
php -v:
Cannot load Xdebug - it was already loaded
PHP 7.4.27 (cli) (built: Dec 16 2021 18:02:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans
with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies
In my php.ini (I double checked that it was the correct one) I appended
zend_extension=xdebug
I am running my site on a docker setup, and am using PhpStorm, here are the settings:
I have the Xdebug extension installed in Chrome and have made sure that PhpStorm is listening. However, when I put a breakpoint in my home controller and navigate to that page, the page loads without any breakpoints being hit.
phpinfo() also shows that xdebug is loaded:
I've noticed that the xdebug version shown in the phpinfo dump does not match the version of xdebug I downloaded and installed:
I am using php 8.1, PhpStorm version 2021.2.3. Xdebug 3
When I create a single PHP file and run it in the built-in web server I can debug correctly opening it from the browser with the Debug extension enabled. However, when I try to do the same from the Laravel project nothing happens.
This is my Xdebug config:
[xdebug]
zend_extension="xdebug.so"
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.client_port=9003
xdebug.discover_client_host=1
php -v
PHP 8.1.0 (cli) (built: Nov 28 2021 01:33:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies
with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans
If I try for example creating a breakpoint in my controller and running my project on the browser with the Xdebug extension enabled nothing happens.
Also, if I create a breakpoint in a model and try to do php artisan tinker and trigger it nothing happens either.
I am wondering what could I be missing.
I'm using XAMPP version v3.2.1 and here's the output of php -v:
PHP 5.4.19 (cli) (built: Aug 21 2013 01:12:03)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
I want to set up Zero-Configuration Debugging with PhpStorm, so I followed all the steps (I think) and tried to launch a PHP file with breakpoints placed on it. But for some reason, when I open / refresh the page, it doesn't detect the breakpoint at all, nor it shows the incoming connection screen in PhpStorm.
I validated my setup here:
and I'm using https://github.com/BrianGilbert/xdebug-helper-for-firefox Firefox plugin.
I just want to simply debug my local PHP website as I browse through it, what am I doing wrong?
You are using PHP 5.4. Please, for the love of god, upgrade. This, and Xdebug's 2.2, haven't been supported for half a decade. Neither PHP 5.4 or Xdebug 2.2 are supported any more, and not for a very long time.
When I try to debug something inside vagrant, I can step through the code, the debugger stops at breakpoint and all looks fine, until the request is done. Then I get the following error in the browser: 324 ERR_EMPTY_RESPONSE. Usual requests (without xdebug) are working without any problem. I can also debug simple php-scripts without encoded content (we use ionCube).
Here are some infos:
vagrant#localdev:~$ php -v
PHP 5.6.36-1+ubuntu14.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.6, Copyright (c) 2002-2016, by ionCube Ltd.
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
vagrant#localdev:~$ php --ini | grep -C20 'xdebug'
/etc/php/5.6/cli/conf.d/20-intl.ini,
/etc/php/5.6/cli/conf.d/20-ioncube.ini,
/etc/php/5.6/cli/conf.d/20-json.ini,
/etc/php/5.6/cli/conf.d/20-mbstring.ini,
/etc/php/5.6/cli/conf.d/20-mcrypt.ini,
/etc/php/5.6/cli/conf.d/20-mysql.ini,
/etc/php/5.6/cli/conf.d/20-mysqli.ini,
/etc/php/5.6/cli/conf.d/20-pdo_mysql.ini,
/etc/php/5.6/cli/conf.d/20-phar.ini,
/etc/php/5.6/cli/conf.d/20-posix.ini,
/etc/php/5.6/cli/conf.d/20-readline.ini,
/etc/php/5.6/cli/conf.d/20-shmop.ini,
/etc/php/5.6/cli/conf.d/20-simplexml.ini,
/etc/php/5.6/cli/conf.d/20-soap.ini,
/etc/php/5.6/cli/conf.d/20-sockets.ini,
/etc/php/5.6/cli/conf.d/20-sysvmsg.ini,
/etc/php/5.6/cli/conf.d/20-sysvsem.ini,
/etc/php/5.6/cli/conf.d/20-sysvshm.ini,
/etc/php/5.6/cli/conf.d/20-tokenizer.ini,
/etc/php/5.6/cli/conf.d/20-wddx.ini,
/etc/php/5.6/cli/conf.d/20-xdebug.ini,
/etc/php/5.6/cli/conf.d/20-xmlreader.ini,
/etc/php/5.6/cli/conf.d/20-xmlwriter.ini,
/etc/php/5.6/cli/conf.d/20-xsl.ini
vagrant#localdev:~$ cat /etc/php/5.6/cli/conf.d/20-xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=On
xdebug.remote_host=192.168.123.1
; xdebug.remote_autostart=On
; xdebug.remote_connect_back=On
; xdebug.remote_handler="dbgp"
; xdebug.remote_port=9000
; xdebug.max_nesting_level=250
; xdebug.idekey="PHPStorm
I have the exact same issue as described here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206368089-Xdebug-only-partially-works
The last comment was:
After upgraded xdebug to 2.2.1 it's work fine for me :)
But I already use 2.5.5 and I think the problem is somehow related to IonCube.
I've read this, too, but as far as I see xdebug is loaded after ionCube anyway in my setup.
Just installed Eclipse-Juno and the associated PHP Development Tools (PDT) SDK from org.eclipse.php.sdk.feature.group.
php --version yields:
PHP 5.4.8-1~precise+1 (cli) (built: Oct 29 2012 14:58:46)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans
Php -m indicates that xdebug is loaded.
[Zend Modules]
Xdebug
In eclipse, Windows->Preferences->Php->Debug->PHP Debubber is Xdebug.
However, none of my breakpoints hit.
What should I check to make debug breakpoints work for PHP on Eclipse-Juno?
I suppose, you are calling your scripts from a web browser. You need to tell xdebug to actually stop on breakpoints. If you are using Firefox, you can use easyXdebug for that. Make sure to enable remote debug in your xdebug.ini (explained in the extension preferences) and also in eclipse (Windows->Preferences->Php->Debug->PHP Debugger->Config). Then you can enable debug by clicking the little icon in your browser status bar for the next request.
For other browsers there should be Plugins as well, but I haven't used any.