似乎我无法在任何情况下删除甚至禁用php中的xdebug,我做错了什么?
xdebug甚至没有出现在phpinfo()或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 )
试图
if(function_exists('xdebug_disable')) { xdebug_disable(); }
也什么都不做
php --ini输出:
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
另外,在这些目录中搜索文本什么都不会产生任何结果,xdebug不在任何知道它从以下地址加载的ini文件中:
find /opt/cpanel/ea-php56/root/etc/php.d/ -type f -exec grep -H 'xdebug' {} \;
这是phpinfo()的configure命令输出:
'./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''
无论如何,我仍然试图将其插入主/opt/cpanel/ea-php56/root/etc/php.ini
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.profiler_enable=0
并寻找
zend_extension = "/path/to/xdebug.so"
指令不产生任何东西
我尝试在/ opt / cpanel /的根目录进行搜索,但我似乎仍无法找到任何相关内容,我在这里将输出包含在pastebin中:https://pastebin.com/4Ej1mdiR
find /opt/cpanel/ -type f -exec grep -H 'xdebug' {} \;
所以我回到了extension_dir的phpinfo()输出,本地值和主值都是:
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
即使我采取了很好的措施
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)
仍然没有xdebug模块
我试过
service httpd restart
我已经进入WHM并重新启动了apache的PHP-FPM服务,而且multiPHP ini编辑器没有任何相关性
我仍然无法做任何事情,xdebug似乎不存在,并且仍在记录堆栈跟踪,导致敏感信息的内存泄漏!
如果它有帮助,我使用phpize和pecl从源代码安装了xdebug-2.5.5。
我尝试的其他事情是进入cPanel的WHM并使用Easy Apache 4降级到Apache而没有PHP,然后重新安装PHP,但仍然无效,仍然堆栈跟踪。 我现在完全失去了,已经连续工作了4天,我认为这对我没有意义。 机器规格,我正在使用
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
尝试从实际官方xdebug网站开始在线跟踪许多卸载/删除指南,但没有任何作用
非常感谢有关如何从我的系统中完全删除xdebug的任何建议!
编辑:仔细查看/ opt / cpanel目录字符串搜索我看到xdebug内置于php-fpm二进制文件/ opt / cpanel / ea-php56 / root / usr / sbin / php-fpm 。也许我需要重建PHP-FPM,我不知道如何在cPanel
中做答案 0 :(得分:1)
您的上次编辑说:
仔细查看/ opt / cpanel目录字符串搜索我看到xdebug内置于php-fpm二进制文件/ opt / cpanel / ea-php56 / root / usr / sbin / php-fpm。 / p>
我认为这是关键所在。如果它是内置的,那么你当然不能删除它。
但是你也说:
xdebug甚至没有出现在phpinfo()或print_r(get_loaded_extensions())中;
这没有任何意义,因为Xdebug在加载时肯定会出现在那里。
所以我不明白Xdebug会发生什么。
但是,你也说:
我仍然无法做任何事情,xdebug似乎不存在,并且仍在记录堆栈跟踪,导致敏感信息的内存泄漏!
这些是出现异常的吗?因为如果是这种情况,它们也可能只是普通的PHP堆栈跟踪(发布一个标头使得这很容易确定)。这些与Xdebug没什么关系,可以通过php.ini中的display_errors=0
来阻止它们在浏览器中出现;并使用log_errors=0
和error_log=
(空字符串)在系统日志文件中。