It seems I cannot remove or even disable xdebug from php under any circumstance at all, what am I doing wrong?
xdebug isn't even showing up in phpinfo() or print_r(get_loaded_extensions());
Array ( [0] => Core [1] => date [2] => ereg [3] => libxml [4] => openssl [5] => pcre [6] => zlib [7] => filter [8] => hash [9] => pcntl [10] => readline [11] => Reflection [12] => SPL [13] => session [14] => standard [15] => cgi-fcgi [16] => bcmath [17] => calendar [18] => ctype [19] => curl [20] => dom [21] => ftp [22] => gd [23] => imap [24] => json [25] => mcrypt [26] => mysqlnd [27] => mysql [28] => mysqli [29] => PDO [30] => pdo_mysql [31] => pdo_sqlite [32] => Phar [33] => posix [34] => SimpleXML [35] => sockets [36] => sqlite3 [37] => tokenizer [38] => xml [39] => wddx [40] => xmlreader [41] => xmlwriter [42] => xsl [43] => mhash )
trying
if(function_exists('xdebug_disable')) { xdebug_disable(); }
also does nothing
php --ini output:
Configuration File (php.ini) Path: /opt/cpanel/ea-php56/root/etc
Loaded Configuration File: /opt/cpanel/ea-php56/root/etc/php.ini
Scan for additional .ini files in: /opt/cpanel/ea-php56/root/etc/php.d
Additional .ini files parsed: /opt/cpanel/ea-php56/root/etc/php.d/02-pecl.ini,
/opt/cpanel/ea-php56/root/etc/php.d/bcmath.ini,
/opt/cpanel/ea-php56/root/etc/php.d/calendar.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ctype.ini,
/opt/cpanel/ea-php56/root/etc/php.d/curl.ini,
/opt/cpanel/ea-php56/root/etc/php.d/dom.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ftp.ini,
/opt/cpanel/ea-php56/root/etc/php.d/gd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/imap.ini,
/opt/cpanel/ea-php56/root/etc/php.d/json.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mcrypt.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysql.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysqli.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_mysqlnd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_sqlite.ini,
/opt/cpanel/ea-php56/root/etc/php.d/phar.ini,
/opt/cpanel/ea-php56/root/etc/php.d/posix.ini,
/opt/cpanel/ea-php56/root/etc/php.d/simplexml.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sockets.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sqlite3.ini,
/opt/cpanel/ea-php56/root/etc/php.d/tokenizer.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xml.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xml_wddx.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlreader.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlwriter.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xsl.ini
also, searching for text in these directories yields nothing, xdebug isn't in any ini files anywhere that php says it's loading from:
find /opt/cpanel/ea-php56/root/etc/php.d/ -type f -exec grep -H 'xdebug' {} \;
here is the configure command output from phpinfo():
'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/opt/cpanel/ea-php56/root/usr' '--exec-prefix=/opt/cpanel/ea-php56/root/usr' '--bindir=/opt/cpanel/ea-php56/root/usr/bin' '--sbindir=/opt/cpanel/ea-php56/root/usr/sbin' '--sysconfdir=/opt/cpanel/ea-php56/root/etc' '--datadir=/opt/cpanel/ea-php56/root/usr/share' '--includedir=/opt/cpanel/ea-php56/root/usr/include' '--libdir=/opt/cpanel/ea-php56/root/usr/lib64' '--libexecdir=/opt/cpanel/ea-php56/root/usr/libexec' '--localstatedir=/opt/cpanel/ea-php56/root/usr/var' '--sharedstatedir=/opt/cpanel/ea-php56/root/usr/com' '--mandir=/opt/cpanel/ea-php56/root/usr/share/man' '--infodir=/opt/cpanel/ea-php56/root/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/opt/cpanel/ea-php56/root/etc' '--with-config-file-scan-dir=/opt/cpanel/ea-php56/root/etc/php.d' '--disable-debug' '--with-pic' '--enable-rpath=/opt/cpanel/ea-php56/root/usr/lib64' '--without-pear' '--with-bz2' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-vpx-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl=/opt/cpanel/ea-openssl' '--with-openssl-dir=/opt/cpanel/ea-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-sockets' '--with-kerberos' '--enable-shmop' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-mhash' '--libdir=/opt/cpanel/ea-php56/root/usr/lib64/php' '--enable-pcntl' '--enable-opcache' '--with-imap=shared,/opt/cpanel/ea-php56/root/usr' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-t1lib=/usr' '--with-gd=shared' '--with-gmp=shared' '--enable-calendar=shared' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-ctype=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-tcadb=/usr' '--enable-exif=shared' '--enable-ftp=shared' '--with-gettext=shared' '--with-iconv=shared' '--enable-sockets=shared' '--enable-tokenizer=shared' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--enable-mysqlnd=shared' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-dom=shared' '--with-pgsql=shared' '--enable-simplexml=shared' '--enable-xml=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/opt/cpanel/libcurl' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-mcrypt=shared,/opt/cpanel/libmcrypt' '--with-tidy=shared,/opt/cpanel/libtidy' '--with-mssql=shared,/opt/cpanel/freetds' '--with-pdo-dblib=shared,/opt/cpanel/freetds' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-shmop=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr' '--enable-fileinfo=shared' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 '-g' '-pipe' '-Wall' '-Wp,-D_FORTIFY_SOURCE=2' '-fexceptions' '-fstack-protector-strong' '--param=ssp-buffer-size=4' '-grecord-gcc-switches' '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' '-m64' '-mtune=generic' '-fno-strict-aliasing' '-Wno-pointer-sign'' 'LDFLAGS=-Wl,-z,relro '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'' 'CXXFLAGS=-O2 '-g' '-pipe' '-Wall' '-Wp,-D_FORTIFY_SOURCE=2' '-fexceptions' '-fstack-protector-strong' '--param=ssp-buffer-size=4' '-grecord-gcc-switches' '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' '-m64' '-mtune=generic''
Regardless, I've still tried to insert this into the main /opt/cpanel/ea-php56/root/etc/php.ini
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.profiler_enable=0
and looking for a
zend_extension = "/path/to/xdebug.so"
directive yields nothing
I tried searching at the root of /opt/cpanel/ and I still can't seem to find anything relevant, I included output on pastebin here: https://pastebin.com/4Ej1mdiR
find /opt/cpanel/ -type f -exec grep -H 'xdebug' {} \;
So I went back to the phpinfo() output to extension_dir and both local and master values are:
ls /opt/cpanel/ea-php56/root/usr/lib64/php/modules
bcmath.so curl.so gd.so mcrypt.so mysqlnd.so pdo_sqlite.so scrypt.so sqlite3.so xmlreader.so xsl.so
calendar.so dom.so imap.so mysqlnd_mysqli.so pdo_mysqlnd.so phar.so simplexml.so tokenizer.so xml.so
ctype.so ftp.so json.so mysqlnd_mysql.so pdo.so posix.so sockets.so wddx.so xmlwriter.so
even for good measure I tried
apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_prefork_module (shared)
cgi_module (shared)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
expires_module (shared)
filter_module (shared)
headers_module (shared)
include_module (shared)
log_config_module (shared)
logio_module (shared)
mime_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
proxy_http_module (shared)
proxy_wstunnel_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_shm_module (shared)
socache_dbm_module (shared)
socache_shmcb_module (shared)
status_module (shared)
unique_id_module (shared)
unixd_module (shared)
userdir_module (shared)
ssl_module (shared)
bwlimited_module (shared)
security2_module (shared)
ruid2_module (shared)
and still no xdebug modules
I've tried
service httpd restart
I've gone into WHM and restarted PHP-FPM service for apache, and multiPHP ini editor has nothing relevant
I still cannot do anything, xdebug appears to be inexistent and is still logging stack traces causing memory leaks of sensitive information!
If it helps at all, I installed xdebug-2.5.5 from source with phpize and pecl.
Other things I have tried are going into cPanel's WHM and using Easy Apache 4 to downgrade to Apache Only with no PHP and then re-installing PHP, and still nothing works, still stack traces. I am at a complete loss right now, been working on it for 4 days straight and I have decided it does not make sense to me. Machine specs, I am working with
uname -a
Linux myhost.com 3.10.0-514.10.2.el7.centos.plus.x86_64 #1 SMP Fri Mar 3 02:04:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
tried following many uninstallation/removal guides online starting with the actual official xdebug website and nothing works
any advice on how to fully remove xdebug from my system is much appreciated!
Edit: looking a little more closely at the /opt/cpanel directory string search I see that xdebug is built into the php-fpm binary at /opt/cpanel/ea-php56/root/usr/sbin/php-fpm. Perhaps I need to rebuild PHP-FPM which I'm not sure how to do in cPanel
Your last edit says:
looking a little more closely at the /opt/cpanel directory string search I see that xdebug is built into the php-fpm binary at /opt/cpanel/ea-php56/root/usr/sbin/php-fpm.
And I think that's the crux. If it's built in, then you can not remove it of course.
But then you also say:
xdebug isn't even showing up in phpinfo() or print_r(get_loaded_extensions());
Which makes no sense, as Xdebug, when loaded, definitely shows up in there.
So I don't understand what's going on here either with Xdebug.
However, you also say:
I still cannot do anything, xdebug appears to be inexistent and is still logging stack traces causing memory leaks of sensitive information!
Are these the one that show up on exceptions? Because if that's the case, it is also possible that they're just normal PHP stack traces (posting the header of one makes that easy to determine). And these have little to do with Xdebug, and can be prevented from showing up in the browser through: display_errors=0
in php.ini; and in the system log files by using log_errors=0
and error_log=
(empty string).