View Issue Details

IDProjectCategoryView StatusLast Update
0002299XdebugUncategorizedpublic2024-10-20 00:20
Reporterdavidhbrown Assigned To 
PrioritylowSeveritytrivialReproducibilityalways
Status newResolutionopen 
PlatformApache/2.4.58 ; PHP 8.3.6OSUbuntuOS Version24.04.01 LTS
Product Version3.2.0 
Summary0002299: Apache OPTIONS dummy connection spams error.log with "Cannot load Xdebug - it was already loaded"
Description
  1. I expect the error.log to contain only "real" errors
  2. The error log occasionally contains many lines stating "Cannot load Xdebug - it was already loaded" when Xdebug should not be involved at all
  3. On a similar server, tail the logs, browse the site and wait for it.
    No PHP script is involved; this is an internal Apache housekeeping process.

The Apache web server makes an internal dummy connection to wake up child processes. Typically several (6-8) such calls are made at 1 second intervals as seen in the access.log:

::1 - - [19/Oct/2024:19:37:24 -0400] "OPTIONS HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"
::1 - - [19/Oct/2024:19:37:25 -0400] "OPTIONS
HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"
::1 - - [19/Oct/2024:19:37:26 -0400] "OPTIONS HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"
::1 - - [19/Oct/2024:19:37:27 -0400] "OPTIONS
HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"
::1 - - [19/Oct/2024:19:37:28 -0400] "OPTIONS HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"
::1 - - [19/Oct/2024:19:37:29 -0400] "OPTIONS
HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"
::1 - - [19/Oct/2024:19:37:30 -0400] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)"

Each request causes "Cannot load Xdebug - it was already loaded" to appear 8 times in the error.log. These lines do not include any additional information at all such as the usual timestamp seen with PHP's error log messages. These appear whether xdebug.mode=debug or xdebug.mode=off:

Cannot load Xdebug - it was already loaded
Cannot load Xdebug - it was already loaded
Cannot load Xdebug - it was already loaded
Cannot load Xdebug - it was already loaded
Cannot load Xdebug - it was already loaded
Cannot load Xdebug - it was already loaded
Cannot load Xdebug - it was already loaded
...many more lines like this... 8 times the number of OPTIONS requests...

*** Very surprising: This behavior persists even if I comment out every line in /etc/php/8.3/mods-available/xdebug.ini, including: ;zend_extension=xdebug.so such that PHP itself does not load Xdebug

It is only a minor annoyance to have these lines suddenly push what I was looking at off the screen, but I thought I should mention it.

Steps To Reproduce

In separate SSH connections, I used the commands:

tail -f /var/log/apache2/error.log
tail -f /var/log/apache2/access.log

...and loaded arbitrary pages from the site in a browser until Apache needed to do its thing and the messages appeared.

Additional Information

All of apache, php, xdebug were installed using apt.

With zend_extension=xdebug.so in xdebug.ini:

From the shell (php -v):
PHP 8.3.6 (cli) (built: Sep 30 2024 15:17:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

From a browser displaying output of phpinfo():
This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.3.6, Copyright (c) Zend Technologies with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

Unsurprisingly, "with Xdebug..." line is not output when xdebug.ini has commented out the extension, i.e., ;zend_extension=xdebug.so

Tagsapache2, php8.3
Operating SystemUbuntu
PHP Version8.3.5-8.3.9

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-10-20 00:20 davidhbrown New Issue
2024-10-20 00:20 davidhbrown Tag Attached: apache2
2024-10-20 00:20 davidhbrown Tag Attached: php8.3