views:

153

answers:

2

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.

A: 

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

VolkerK
Possibly, I find it unlikely though as it comes installed by default on Windows XP. I'll find out though.
Blair McMillan
A: 

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"));
}
Blair McMillan
How did you run it differently? I'm experiencing the same problem.
Sebastian Hoitz
I've updated my answer.
Blair McMillan