php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #32951 Need to specify php.ini path to ISAPI .dll
Submitted: 2005-05-05 09:51 UTC Modified: 2016-12-30 22:51 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hgrunw at gmail dot com Assigned:
Status: Open Package: *Configuration Issues
PHP Version: 5.0.4 OS: Windows (any)
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-05-05 09:51 UTC] hgrunw at gmail dot com
Description:
------------
Problem: when using PHP4 ISAPI .dll for a virtual directory XXX and PHP5 ISAPI .dll for a virtual directory YYY in IIS, it is impossible to specify different php.ini-s for the .dll-s. PHPRC won't obviously work.

Proposal: search for php.ini in the following order in PHP5:
1) PHP5RC env. variable,
2) PHPRC env. variable,
3) (other options).

Alternative: find a way of using the php.ini from the ISAPI .dll load directory (seems more complicated to implement).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-05 10:42 UTC] hgrunw at gmail dot com
I propose the following patches to PHP5 to resolve the problem:

1) Registry based fix:

diff -Nurp win32.orig\registry.c win32\registry.c
--- win32.orig\registry.c	Mon Mar 14 18:12:56 2005
+++ win32\registry.c	Thu May 05 13:47:40 2005
@@ -1,7 +1,7 @@
 #include "php.h"
 #include "php_ini.h"
 
-#define PHP_REGISTRY_KEY "SOFTWARE\\PHP"
+#define PHP_REGISTRY_KEY "SOFTWARE\\PHP5"
 
 void UpdateIniFromRegistry(char *path TSRMLS_DC)
 {

2) PHPRC / PHP5RC env. variable

diff -Nurp main.orig\php_ini.c main\php_ini.c
--- main.orig\php_ini.c	Fri Sep 17 08:18:48 2004
+++ main\php_ini.c	Thu May 05 13:56:32 2005
@@ -290,9 +290,11 @@ int php_init_config()
 	safe_mode_state = PG(safe_mode);
 	open_basedir = PG(open_basedir);
 
-	env_location = getenv("PHPRC");
+	env_location = getenv("PHP5RC");
 	if (!env_location) {
-		env_location = "";
+		env_location = getenv("PHPRC");
+		if (!env_location)
+			env_location = "";
 	}
 	if (sapi_module.php_ini_path_override) {
 		php_ini_search_path = sapi_module.php_ini_path_override;

They both could be incorporated?
 [2014-12-26 18:43 UTC] irker@php.net
Automatic comment from SVN on behalf of irker
Revision: http://svn.php.net/viewvc/?view=revision&revision=335381
Log: Fix bug #66883
----
Thx to Schamil Targiev #32951
 [2016-12-30 22:51 UTC] cmb@php.net
-Package: Feature/Change Request +Package: *Configuration Issues
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Mar 26 13:01:26 2019 UTC