1

我正在为之前在这里询问过的 Yii 框架编写一个扩展,有人报告以下错误:

com_exception

描述

来源:未知
描述:未知源文件

C:\wamp\www\yiisample\protected\extensions\gallery\EGalleryBase.php(364)

他们使用 WAMP 5、PHP 版本 5.2.1 和 Window XP。

第 364 行是指:

$Command = realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'EGalleryProcessQueue.php '.$this->_realpath.' '.$this->thumbnailWidth.' '.$this->thumbnailHeight;
$WshShell = new COM("WScript.Shell"); // <- This line
$WshShell->Run("php.exe $Command", 0, false);

但是您可以在这个问题中看到整个适当的部分。

我已经检查并且php.exe不在定义PATH中,但即使在修复之后,问题仍然存在。

谷歌搜索几乎总是指向循环问题Word,或者似乎根本没有帮助的PHP 错误。

有没有人对问题是什么有任何建议,或者关于如何调试这个问题的一些建议,以便我获得比“未知”更多的信息。

谢谢。

4

2 回答 2

4

最终通过以不同的方式运行它来解决这个问题。

编辑:

这是我使用的。

else // Windows
{
    /* Rather than using the original code of:
     * $WshShell = new COM("WScript.Shell");
     * $WshShell->Run("php.exe $Command", 0, false);
     * Use:
     */
    pclose(popen("start /B php.exe $Command 2>nul >nul", "r"));
}
于 2010-02-23T09:47:44.037 回答
0

也许Windows Script Host根本没有安装在该特定机器上,因此不存在 WScript.Shell ProgId?

于 2010-01-02T17:28:18.390 回答