From: [EMAIL PROTECTED]
Operating system: Windows NT 4.0/W2k
PHP version: 4.1.0
PHP Bug Type: COM related
Bug description: using com_* versus new COM(...) and error reporting
Hello,
I want connect to COM server, that publish data from some application.
Script run forever, but application my be started or stoped.
If I try use following script, I cannot discover if invoking object method
is succesful or not. Here is script:
$tag = new COM("FLINK.TAGOBJ") or die("Unable to instanciate Flink");
while (1) {
$bool = $tag->bind("DATETIME");
if ($bool === false){
print "Bind failed\n";
};
$val = $tag->read; // This function return value from binded variable
if ($val === false){
print "Read failed\n";
};
print "Val: $val\n";
sleep(1);
};
$tag->Release();
$tag = null;
Messages "* failed" is not reported, if application not run.
The following script run correctly:
$tag = com_load("FLINK.TAGOBJ") or die("Unable to instanciate Flink");
while (1) {
$bool = com_invoke($tag, "bind", "DATETIME");
if ($bool === false){
print "Bind failed\n";
};
$val = com_invoke($tag, "read"); // This function return value from
binded variable
if ($val === false){
print "Read failed\n";
};
$val = com_propget($tag, "read"); // This function return value from
binded variable
if ($val === false){
print "Propget Read failed\n";
};
print "Val: $val\n";
sleep(1);
};
com_release($tag);
$tag = null;
Is this feature or bug.
--
Edit bug report at http://bugs.php.net/?id=15543&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15543&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15543&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15543&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15543&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15543&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15543&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15543&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15543&r=submittedtwice