|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16757 setting server_name to NULL doesn't work
Submitted: 2002-04-23 11:20 UTC Modified: 2002-04-27 06:13 UTC
From: msisolak at yahoo dot com Assigned:
Status: Closed Package: COM related
PHP Version: 4.2.0 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: msisolak at yahoo dot com
New email:
PHP Version: OS:


 [2002-04-23 11:20 UTC] msisolak at yahoo dot com
In 4.2 you can no longer set server_name to NULL (which you need to do if you just want to set the codepage).  The problem is the code that was added to 4.2 to process server_name as an ARRAY.  In 4.1.2 the code looked like this (COM.c, line 486):

	if (server_name != NULL)
		if (Z_TYPE_P(server_name) == IS_NULL) {
			server_name = NULL;
		} else {
			if (!INI_INT("com.allow_dcom")) {
				php_error(E_WARNING, "DCOM is disabled");
			} else {

In the 4.2.0 COM.c, the new flags variable set and IS_ARRAY check was added before the IS_NULL check, instead of inside the else branch - thus flags is set to remote invocation, even if server_name is NULL.  To fix this I moved everything below "if (server_name != NULL)" and above "if (Z_TYPE_P(server_name) == IS_NULL) {" to after "} else {".


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-27 06:13 UTC]
This bug has been fixed in CVS.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 17:05:53 2022 UTC