Unknown com_exception error

无人久伴 提交于 2019-12-24 08:44:14

问题


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.


回答1:


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



回答2:


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



来源:https://stackoverflow.com/questions/1991630/unknown-com-exception-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!