当我在Eclipse中调试PHP脚本时,它不会加载mysql扩展名 [英] While I am debugging PHP Script in Eclipse, it doesn't load mysql extension

查看:114
本文介绍了当我在Eclipse中调试PHP脚本时,它不会加载mysql扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 10.10上安装了Eclipse和xDebug。

当我将一些php文件作为一个页面进行调试时,工作正常。

当我尝试将其作为脚本进行调试时我给出了没有加载mysql扩展的消息。

我为PHP可执行文件设置了以下选项:




  • 可执行路径:/ usr / bin / php

  • PHP ini文件:/etc/php5/apache2/php.ini

  • SAPI类型:CLI

  • PHP调试器:XDebug



我写了以下脚本:



test.php

<?php

$ ext = get_loaded_extensions();

print_r ($ ext);

?>



当我输入命令行/ usr / bin / php test .php

我给50个加载的模块包括mysql和mysqli。

当我在Eclipse中调试它作为一个页面时,我给出相同的模块和xdebug。

当我调试它作为一个页面在Eclipse我给45个模块包括xdebug,但mysql和mysqli没有加载。

解决方案

Eclipse PDT团队决定引入-n选项来修复错误#324073 。所以只有/ tmp / zend_debug / ...中的php.ini被加载,所有其他INI文件都没有加载。



这是从PDT 2.2引入的.0 M201010110334(2010/10/11)。



有关详细信息,请参阅以下链接:




I have installed Eclipse and xDebug on Ubuntu 10.10.
When I debug some php file as a page, that works fine.
When I try to debug it as a script, I give the message that mysql extension is not loaded.
I set the following options for PHP executable:

  • Executable path: /usr/bin/php
  • PHP ini file: /etc/php5/apache2/php.ini
  • SAPI type: CLI
  • PHP debugger: XDebug

I wrote the following script:

test.php
<?php
$ext = get_loaded_extensions();
print_r($ext);
?>

When I put in command line /usr/bin/php test.php
I give 50 loaded modules include mysql and mysqli.
When I debug it as a page in Eclipse I give the same modules and xdebug.
When I debug it as a page in Eclipse I give 45 modules include xdebug, but mysql and mysqli are not loaded.

解决方案

The Eclipse PDT team decided to introduce the -n option to fix the Bug #324073. So only php.ini from /tmp/zend_debug/... has been loaded, and all additional INI files have not been loaded.

This has been introduced since PDT 2.2.0 M201010110334 (2010/10/11).

For more information, see the following links:

这篇关于当我在Eclipse中调试PHP脚本时,它不会加载mysql扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆