PHP on Windows with XAMPP running 100 times too slow PHP on Windows with XAMPP running 100 times too slow windows windows

PHP on Windows with XAMPP running 100 times too slow


I found the problem was Xdebug in xampp\php\php.ini. Here're the results of trying many solutions found around the web:

Run XAMPP as adminisrator and restart server: 3617 ms

In xampp/apache/conf/httpd.conf, replace localhost with 127.0.0.1 and restart server: 3639 ms

In Windows/System32/drivers/etc/hosts, add “127.0.0.1 127.0.0.1” & “127.0.0.1 localhost” and restart Windows: 3960 ms

In Windows/System32/drivers/etc/hosts, un-comment “127.0.0.1 localhost” and restart Windows: 3659 ms

In php.ini, uncomment zend_extension = "C:\xampp\php\ext\php_eaccelerator_ts.dll" and restart server: 3643 ms

In php.ini, set xdebug.remote_enable=0: 3598 ms

In php.ini, set remote_host="localhost": 3593 ms

In php.ini, set xdebug.profiler_enable=0: 249 ms

In php.ini, comment out all Xdebug statements: 27 ms - Success!

The sad part is, I make mistakes and need Xdebug :-(


I solve my problem with xdebug idekey setting (xdebug.idekey="xdebug1"), and chrome extension xdebug helper (https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc)

*Dont forget to disable remote_autostart (xdebug.remote_autostart=0)

Only activating debug (xdebug) by request, using idekey setting, so if debug not needed php processing can be faster/normal, tonggle by button with chrome extension

I'm using xampp 1.8.3 on windows 10 64bit, i use custom idekey, xdebug.idekey="xdebug1", same with xdebug helper setting

[XDebug]zend_extension = "E:\xampp183\php\ext\php_xdebug.dll"xdebug.profiler_append = 0xdebug.profiler_enable = 1xdebug.profiler_enable_trigger = 0xdebug.profiler_output_dir = "E:\xampp183\tmp"xdebug.profiler_output_name = "cachegrind.out.%t-%s"xdebug.remote_enable = 1xdebug.remote_autostart=0xdebug.idekey="xdebug1"xdebug.remote_handler = "dbgp"xdebug.remote_host = "127.0.0.1"xdebug.trace_output_dir = "E:\xampp183\tmp"xdebug.remote_log="E:\xampp183\tmp\xdebug\xdebug.log"

setting1

enter image description here

enter image description here

Now breakpoint/debug activated only if session is requsted via xdebug helper


I excluded my website folder and my xampp folder in Windows Defender and things were solved here.