无法从php 5.6中删除甚至禁用xdebug-2.5.5

问题描述 投票:1回答:1

在任何情况下我似乎无法从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 - 这是输出:

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文件中,而是说php正在加载来自:

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' {} \;

所以我回到了phpinfo()输出到extension_dir,本地值和主值都是:

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内置于/ opt / cpanel / ea-php56 / root / usr / sbin / php-fpm的php-fpm二进制文件中。也许我需要重建PHP-FPM,我不知道如何在cPanel中做

php cpanel xdebug whm easyapache-4
1个回答
1
投票

你的上一次编辑说:

更仔细地查看/ opt / cpanel目录字符串搜索我看到xdebug内置于/ opt / cpanel / ea-php56 / root / usr / sbin / php-fpm中的php-fpm二进制文件中。

我认为这是关键所在。如果它是内置的,那么你当然不能删除它。

但是你也说:

xdebug甚至没有出现在phpinfo()或print_r(get_loaded_extensions())中;

这没有任何意义,因为Xdebug在加载时肯定会出现在那里。

所以我不明白Xdebug在这里发生了什么。

但是,你也说:

我仍然无法做任何事情,xdebug似乎不存在,仍在记录堆栈跟踪导致敏感信息的内存泄漏!

  • 这些堆栈的痕迹到底是什么?
  • 他们在哪里登录?

这些是出现异常的吗?因为如果是这种情况,它们也可能只是普通的PHP堆栈跟踪(发布一个标头使得这很容易确定)。这些与Xdebug没什么关系,可以通过php.ini中的display_errors=0阻止它出现在浏览器中;并使用log_errors=0error_log=(空字符串)在系统日志文件中。

© www.soinside.com 2019 - 2024. All rights reserved.