未知的com_exception错误 [英] Unknown com_exception error
问题描述
我正在为 Yii框架编写一个扩展名,我有此处关于,有人报告以下错误:
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
com_exception
描述
来源:未知_ 说明:未知
源文件
Source: Unknown
Description: Unknown
Source File
C:\ wamp\www\yiisample\protected\extensions\gallery\EGalleryBase.php(364)
C:\wamp\www\yiisample\protected\extensions\gallery\EGalleryBase.php(364)
他们正在使用WAMP 5,PHP 5.2.1和Windows XP。
They are using WAMP 5, PHP Version 5.2.1 and 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
中,但即使在修复后,问题仍然存在。
I've checked and php.exe
wasn't in a defined PATH
, but even after fixing that, the problem remains.
Google搜索几乎总是指向 Word
或 PHP bug ,似乎根本没有帮助。
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".
谢谢。
推荐答案
通过不同的方式来解决这个问题。
Ended up solving this by running it differently.
strong>编辑
这是我用的代替。
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"));
}
这篇关于未知的com_exception错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!