在远程服务器(bluehost.com)上安装Xdebug [英] Installing Xdebug on a remote server (bluehost.com)
问题描述
我已经在Mac上安装了xdebug并可以在其上运行,但似乎无法在服务器(bluehost.com服务器)上安装它。我已经尝试了很长时间了,希望能提供帮助。
I have xdebug installed and working on my mac but I can't seem to get it installed on my server ( a bluehost.com server). I have been trying for ages and would appreciate any help possible.
基本上我已经下载了'xdebug.so'并将其安装在我的/ public_html /目录中
Basically I have downloaded 'xdebug.so' and installed it in my /public_html/ directory
然后进入我的php.ini文件(位于同一目录中),然后删除所有其他[zend]引用并插入以下内容:
I then go into my php.ini file (which is in the same directory) and I remove any other [zend] references and inserted the following:
zend_extension=/home1/[myUserName]/public_html/xdebug.so
zend_extension_ts = /home1/[myUserName]/public_html/xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
这基本上与我的Mac电脑完全一样,而且工作正常。
This is basically exactly as what I have on my mac and it's working fine.
我拥有 home1而不是 home的原因是因为那是bluehost设置我的网站的方式。我也尝试过使用这两种方法只是为了检查但没有运气。
The reasons I have 'home1' instead of 'home' is because that's how bluehost set up my site. Also I have tried using both just to check but without luck.
当我运行phpInfo()时,没有得到对Xdebug的任何引用。
When I run phpInfo() I don't get any references to Xdebug.
我不知所措,这花了我几个小时在Mac上进行设置(几个月前),现在我已经花了几个小时试图在我的Mac上进行设置服务器。
I'm at a loss here it took me hours to set it up on my mac (months ago) and now I have spent hours trying to set it up on my server.
注意:我已联系bluehost.com寻求帮助,但仍在等待。他们还说他们不为此类问题提供支持,所以我没有屏息。
Note: I have connyacted bluehost.com for help but am still waiting. They also say they don't provide support for such issues so I am not holding my breath.
谢谢!
推荐答案
某些原因可能导致此问题:
There is some reasons that might cause this issue:
-
已编译扩展名与当前环境不兼容(可能由编译器,PHP版本和意外的配置引起)
compiled extensions is not compatible with current environment(might cause by compiler, php version, and unexpected config)
无效的php.ini配置(无效的extension_dir,甚至错误的ini)文件引用)
invalid php.ini configuration (invalid extension_dir, even wrong ini file refer)
及更多...
可行的解决方案
请参考官方教程此处
- 创建一些必要的目录
mkdir〜/ pecl〜/ php〜/ php / extensions
- 下载xdebug并将其解压缩到pecl文件夹
- 对我来说,我需要xdebug v2.5.5 s ince最新的xdebug不支持php 5.6
pecl下载xdebug-2.5.5&& tar -xvzf xdebug-2.5.5
- 输入xdebug文件夹并编译扩展
cd xdebug-2.5.5
phpize
./ config --prefix = $ HOME /pecl/xdebug-2.5.5
make
- 进入模块文件夹并将模块复制到正确位置
cp xdebug.so〜/ php / extensions
- 在php.ini
- 对我来说,php.ini是在public_html下创建的
中设置扩展名
zend_extension = / home {#} / {username} /php/extensions/xdebug.so
zend_extension=/home{#}/{username}/php/extensions/xdebug.so
- 创建一个名为 phpinfo.php的文件,并检查xdebug是否已成功安装是否。
这篇关于在远程服务器(bluehost.com)上安装Xdebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!