Bug #41577 [Asn->Csd]: DOTNET is successful once per server run

From: Date: Tue, 12 Aug 2014 09:56:52 +0000
Subject: Bug #41577 [Asn->Csd]: DOTNET is successful once per server run
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187089@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=41577&edit=1

 ID:                 41577
 Updated by:         ab@php.net
 Reported by:        boen dot robot at gmail dot com
 Summary:            DOTNET is successful once per server run
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            COM related
 Operating System:   Windows XP Professional SP2
 PHP Version:        5CVS-2007-06-03 (snap)
 Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

Merged in b3860f4224890b16f53aa86981a342f721293d11 and backported.

Thanks!


Previous Comments:
------------------------------------------------------------------------
[2014-07-08 08:47:59] ab@php.net

@a dot kasparas at gmc dot lt I saw your https://github.com/php/php-src/pull/681 to this
ticket, feel free to attach it here. Also, could you please rebase it to 5.4 Gonna test and merge it
then.

Thanks.

------------------------------------------------------------------------
[2014-03-13 15:20:58] a dot kasparas at gmc dot lt

In the present form DOTNET class is completely unuseable in FastCGI scenario,
as it crashes php-cgi.exe process on every second request. Both patches submitted to this bug solve
crashing. Therefore, please apply any of them to master source.

------------------------------------------------------------------------
[2013-02-16 09:37:20] ku at digitaldolphins dot jp

Is it good idea to disable release action in rshutdown?

---
void php_com_dotnet_rshutdown(TSRMLS_D)
{
	struct dotnet_runtime_stuff *stuff = COMG(dotnet_runtime_stuff);
	
	if (stuff->dotnet_domain) {
	//	IDispatch_Release(stuff->dotnet_domain);
	//	stuff->dotnet_domain = NULL;
	}
}
---

My own php 5.4.11 build works well with this workaround.

Any possible side effects?

Thanks

------------------------------------------------------------------------
[2013-02-14 06:22:16] ku at digitaldolphins dot jp

I have this problem too.

It seems that the access to the released pointer may cause it.

line 233 in C:\php-sdk\php54dev\vc9\x86\php-5.4.11\ext\com_dotnet\com_dotnet.c 
---
hr = stuff->dotnet_domain->lpVtbl->CreateInstance(stuff->dotnet_domain, 
oleassembly_sys, oletype_sys, &unk);
---

stuff->dotnet_domain is released in both php_com_dotnet_rshutdown and 
php_com_dotnet_mshutdown.

However it would not be recovered for further requests.

Either rinit or com_dotnet_create_instance may need check for pointer access.

Thanks

------------------------------------------------------------------------
[2008-06-03 16:32:00] sam at bitopia dot co dot uk

I had this problem, and finally managed to solve it by running php as cgi instead of an apache
module, google for how to do it, but basically it's disabling the apache module, then adding
three lines in the apache conf

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=41577


--
Edit this bug report at https://bugs.php.net/bug.php?id=41577&edit=1


Thread (12 messages)

« previous php.bugs (#187089) next »