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: 2021-05-23 04:34 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: krakjoe (profile)
Status: Closed Package: *Configuration Issues
PHP Version: 5.0.4 OS: Windows (any)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hgrunw at gmail dot com
New email:
PHP Version: OS:

 

 [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
 [2020-12-30 12:47 UTC] nikic@php.net
Automatic comment on behalf of irker
Revision: http://git.php.net/?p=doc/ru.git;a=commit;h=de6872bcf802def8efca3540ed24457c0b628d5e
Log: Fix bug #66883 ---- Thx to Schamil Targiev #32951
 [2021-05-23 04:34 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2021-05-23 04:34 UTC] krakjoe@php.net
ISAPI is no longer distributed with PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC