未知的 com_exception 错误

发布于 2024-08-16 12:30:50 字数 1114 浏览 7 评论 0原文

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

com_异常

描述

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

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 中,但即使在修复该问题之后,问题仍然存在。

Google 搜索几乎总是指向与 WordPHP 相关的问题bug 似乎根本没有帮助。

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

谢谢。

I'm writing an extension for the Yii framework which I have asked on here about before and someone is reporting the following error:

com_exception

Description

Source: Unknown
Description: Unknown
Source File

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

They are using WAMP 5, PHP Version 5.2.1 and Window XP.

Line 364 refers to:

$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);

But you can see the whole appropriate section in this question.

I've checked and php.exe wasn't in a defined PATH, but even after fixing that, the problem remains.

Google searches almost always point to problems revolving Word, or a PHP bug that doesn't seem to help at all.

Does anyone have any suggestions on what the problem is, or some suggestions as to how I can debug this so that I get more information than "Unknown".

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

权谋诡计 2024-08-23 12:30:50

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

编辑:

这是我使用的。

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"));
}

Ended up solving this by running it differently.

Edit:

Here's what I used instead.

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"));
}
别靠近我心 2024-08-23 12:30:50

也许Windows 脚本宿主根本就不是' t 安装在该特定计算机上,因此不存在 WScript.Shell ProgId?

Maybe the Windows Script Host simply isn't installed on that particular machine and therefore no WScript.Shell ProgId exists?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文