I installed php 5.4.0 and nginx 1.0.14 on windows 7.
When i want to install xdebug i downloaded xdebug 2.20(new for 5.4.0) and then i copied dll into my "php ext" folder.After that i added these lines in php.ini file.
zend_extension = C:\nginx\php\ext\php_xdebug.dll
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_autostart=off
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9900
but when i started nginx it seems "Failed loading C:\nginx\php\ext\php_xdebug.dll" but the folder and file is correct.
But when i tried to change "zend_extension = C:\nginx\php\ext\php_xdebug.dll" with "zend_extension_ts = C:\nginx\php\ext\php_xdebug.dll" it didnt seem any error but my phpinfo() file doesnt seem xdebug installed.
How can i run it ?
You should no longer use zend_extension_ts, but just zend_extension. The _ts and _debug postfixes have been removed in PHP 5.3. If you see "failed loading" it's most likely that you use the wrong binary. Please refer to http://xdebug.org/find-binary.php to see which one you need.
Related
Following the official documentation I wanted to run Xdebug in "jit" mode. But not working. When I add configuration to my php.ini file then everything works but every request (even when Xdebug listener in PhpStorm is off) takes long (5s to 0.5s when Xdebug is off in php.ini).
So I wanted to make it in "jit" mode or "on demand" but both are not working.
I'm using Windows 8.1 and XAMPP.
This is my config:
The minimum config that works for me in WAMPServer & Netbeans is
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
I see you are configuring for the CLI, so check that the php.ini file you have changed is the one used by the CLI.
You can check that by doing this from the command line
>php --ini
then check the Loaded Configuration File to make sure you edited the right file
UPDATE
You also must uncomment, delete the leading ;, from the zend_extension line
zend_extension="c:/xampp/php/ext/php_xdebug-2.9.5-7.4-vc15-x86_64.dll"
Useful informations:
Ubuntu 19.04 x86_64
PHP 7.2
Xampp for linux 7.3.4
Netbeans 8.2
Xdebug 2.7.1
I installed with success PHP-cli, netbeans and xampp for linux on my brand new Ubuntu 19.04 installation.
After that I uploaded my /opt/lampp/etc/php.ini file on https://xdebug.org/wizard.php and I followed scrupulously the instructions.
I copied the generated xdebug.so in /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731 and then I edited the /opt/lampp/etc/php.ini adding those lines:
[xdebug]
zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9000
I went to http://localhost/dashboard/phpinfo.php , here I can see the Zend Engine logo but in the "configuration" section there isn't any xdebug section.
In my local terminal i executed those commands php -m and php -v. The first returned a list of modules among which xdebug was not included, the second returned a the php version and, again, xdebug was not included.
After this I decided to add the [xdebug] section also in the /etc/php/7.2/cli/php.ini and then the php -m and php -v commands have returned xdebug in loaded modules and in the version list.
Anyway the http://localhost/dashboard/phpinfo.php refuses to list xdebug among the active modules and if I try to start a debug session netbeans hangs-on "waiting for connection xdebug".
I checked two, three, four.... times the zend_extension path and is corrected
I restarted multiple times lampp, apache, netbeans and the pc
I tried multiple ports 9000, 9001, 9002 ....
The php and xdebug versions are compatible
Here are some similar problems: xdebug in phpinfo() is not showing , No xdebug in phpinfo() , Xdebug installed but does not display in Phpinfo for Xampp .
Obviously, when I could, I tried these solutions, but without success.
I've setup the xdebug, and I think I have installed it correctly. When I run php -v in terminal, it showed up my "with xDebug v2.6.1". Looking at the phpinfo(), it does show the xdebug extension. Running php -m on terminal does show the Xdebug under the [Zend Modules].
Now I'm trying to set it up for VS Code. I have the extension PHP Debug installed, Chrome extension xdebug installed.
The problem now is when I F5 from VS Code, it will give me fatal error : Class 'ParentClass' not found.
I'm running PHP v7.0.30 for Windows 10, with the server being IIS.
My php.ini:
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_port = 9000
xdebug.autostart = 1
xdebug.remote_log = "C:\Program Files (x86)\IIS Express\PHP\v7.0\tmp\xdebug.log"
zend_extension = "C:\Program Files (x86)\IIS Express\PHP\v7.0\ext\php_xdebug-2.6.1-7.0-vc14-nts.dll"
Any idea?
Hello I have installed xampp, changed the php.ini to this:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.3-vc9.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
So I created a php file:
<?php
phpinfo();
?>
Copy pasted the content and pasted in the xdebug wizard and got this output:
Tailored Installation Instructions
Summary
Xdebug installed: no
Server API: Apache 2.4 Handler Apache Lounge
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.7
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: C:\xampp\php\php.ini
Extensions directory: C:\xampp\php\ext
Instructions
Download
Move the downloaded file to C:\xampp\php\ext
Edit C:\xampp\php\php.ini and add the line
zend_extension = C:\xampp\php\ext\
Restart the webserver
If you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.
This tells me that it is not installed, so I followed the instructions and restarted the server. Opened the info php again, copied everything again and pasted it in the wizard again. Press the button and I get the exact same output, I don't know what I am doing wrong can anyone tell me what I do wrong?
Step 1: goto https://xdebug.org/wizard.php
step 2: copy and paste your phpinfo output to textarea which will be displayed on https://xdebug.org/wizard.php
step 3: click on analyze my phpinfo() output button, it will analyze your system and based on that it will give you suitable php_xdebug.dll file that you need to put at D:\xampp\php\ext folder
step 4: edit your php.ini file and add following line
zend_extension = D:\xampp\php\ext\your-php_xdebug.dll
step 5: Restart Server
Reference Video Tutorial : https://www.youtube.com/watch?v=HbJOP0YcSjs
complete video Tutorial for PHP Debug Example : Demo
Recent XAMPP version(mine is v3.2.2) already had the file php_xdebug.dll in xampp\php\ext folder , so we don't need go to https://xdebug.org/wizard.php for downloading the file.
Just open the file xampp\php\php.ini, add the codes:
[xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
Restart the XAMPP, then you could see the xdebug is working by type php --version in CMD:
Have you rectified the issue ?, if not please try this. I am having the same situations as yours, and I got result by
1)php.ini file content
zend_extension = "c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
;xdebug.remote_host="localhost:81"
xdebug.remote_host=192.168.1.5
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
please place the above mentioned dll at c:\xampp\php\ext\
xdebug.remote_host=192.168.1.5 - This is the IPv4 address of my system, I changed to this because I couldn't debug with localhost and 127.0.0.1.
in NetBeans IDE, open Tools-> Options->PHP->Debugging. The values of debugger port and Session Id should match with the port and idekey specified in php.ini
Now save php.ini, restart Apache and now try for debugging
Thanks Johnson
I had the same problem and it was solved checking the versions of php and xampp: it turned out, xampp was 32 bits (installed in a 64 bits computer) and I chose the wrong version of xdebug (it has to be 32 bits).
As mentioned earlier, make sure your xampp installation doesn't already have php_xdebug file in the php/ext folder before downloading xdebug dll. If the xampp/php/ext folder already has a php_xdebug file, just add 1 line in the php.ini file
[xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
In general this extension come with the XAMPP package (look into your \xampp\php\ext folder) but it's not added to your php.ini automatically.
add this line manually into your php.ini
extension=php_xdebug.dll
It's all ;) that worked for me
I am trying to get the following to setup work:
Windows 7 - 64-bit
XAMPP 1.7.4
XDebug [php_xdebug-2.1.0-5.3-vc9-x86_64.dll]
When I run phpinfo() from Xampps homepage, XDebug it is not listed anywhere. I checked the Apache error logs and there are no errors, so it seems to load the module without problem? I haven't used PHP in years so I have no clue why this isn't working.
[PHP.ini]
[XDebug]
zend_extension_ts = "C:\xampp\php\ext\php_xdebug-2.1.0-5.3-vc9-x86_64.dll"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
I think you don't have the right compiler version. Copy the output of your phpinfo onto this page and it will tell you which version you need.
Print out your
phpinfo();
and look at "Compilater" line
At home (win7x64 + wamp) => MSVC6 (Visual C++ 6.0)
So you need the vc6 version not vc9 version