By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

objects... asp does... php doesn't

P: n/a
Hi all,

I have a system running IIS en Apache. It is also running ASP and PHP.

Why would

<%
Dim obj1
Dim var1

Set obj1 = Server.CreateObject("conv1.conv2")
obj1.method1
var1 = obj1.property1

Set obj1 = Nothing
%>

work and

<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;
$var1 = $obj1->property1;

$obj1 = null;
?>

not? In both instances the object does get created!!
TIA
Roger
Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
PI*****@HOME.NL wrote:
<% sorry, don't know asp
<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;

Is this a function call?
If it is, I guess you need parentheses, like
$obj1->method1();

--
--= my mail address only accepts =--
--= Content-Type: text/plain =--
--= Size below 10K =--
Jul 17 '05 #2

P: n/a
In my own experience I've found that COM doesn't work very well in
PHP4. It has a way of rapidly leaking memory. You might want to stick
with using ASP if you must make use of COM objects.

"PI*****@HOME.NL" <PI*****@HOME.NL> wrote in message news:<1f********************************@4ax.com>. ..
Hi all,

I have a system running IIS en Apache. It is also running ASP and PHP.

Why would

<%
Dim obj1
Dim var1

Set obj1 = Server.CreateObject("conv1.conv2")
obj1.method1
var1 = obj1.property1

Set obj1 = Nothing
%>

work and

<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;
$var1 = $obj1->property1;

$obj1 = null;
?>

not? In both instances the object does get created!!
TIA
Roger

Jul 17 '05 #3

P: n/a
Chung Leong wrote on Friday 28 November 2003 20:44:
In my own experience I've found that COM doesn't work very well in
PHP4. It has a way of rapidly leaking memory. You might want to stick
with using ASP if you must make use of COM objects.


It's not just COM. In my experience, there is no way to free the memory
that's taken up by any object in PHP until the script execution ends. This
applies to PHP4; I haven't tested PHP5 yet.

--
Business Web Solutions
ActiveLink, LLC
www.active-link.com/intranet/
Jul 17 '05 #4

P: n/a
I wasn't talking about PHP failing to release memory within a given
script. The leak I was encountering persists after the script has
completed execution. When PHP is running as an Apache module on
Windows, this would lead eventually to a server crash.

I've spend a bit of time with PHP 5 beta 2 and I can report happily
that memory management is much better. A script that would grind to a
halt in PHP4 is able to run uneventfully in PHP5.

Zurab Davitiani <ag*@mindless.com> wrote in message news:<wE*******************@newssvr25.news.prodigy .com>...
Chung Leong wrote on Friday 28 November 2003 20:44:
In my own experience I've found that COM doesn't work very well in
PHP4. It has a way of rapidly leaking memory. You might want to stick
with using ASP if you must make use of COM objects.


It's not just COM. In my experience, there is no way to free the memory
that's taken up by any object in PHP until the script execution ends. This
applies to PHP4; I haven't tested PHP5 yet.

Jul 17 '05 #5

P: n/a
False, ASP dont use () for method call

Savut

"Pedro Graca" <he****@hotpop.com> wrote in message
news:bq*************@ID-203069.news.uni-berlin.de...
PI*****@HOME.NL wrote:
<%

sorry, don't know asp
<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;

Is this a function call?
If it is, I guess you need parentheses, like
$obj1->method1();

--
--= my mail address only accepts =--
--= Content-Type: text/plain =--
--= Size below 10K =--

Jul 17 '05 #6

P: n/a
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
False, ASP dont use () for method call


But you're not using ASP, you're using PHP. And PHP requires () on
method calls.

--
There is no signature.....
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.