Unknown com_exception error
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 FileC:\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 alwa开发者_C百科ys 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.
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"));
}
Maybe the Windows Script Host simply isn't installed on that particular machine and therefore no WScript.Shell ProgId exists?
精彩评论