NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Specifying IniFilePath for php.ini


Joined: 27 Feb 2008
Posts: 2
Reply with quote
Is there a way to make PHPDock ignore the registry entry HKLM\Programs\PHP\IniFilePath? I have a previous installation of PHP (which uses that registry key) and I would like my PHPDock application to use its own php.ini.
View user's profileFind all posts by orzoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
PhpDock does not use this registry value. Php does and will certainly fail if ini file specified in its value comes with its own extension_dir and loads php extensions from incompatible php version. For example, if you have php 5.1.6 already installed, you can't use php 5.2.5 that comes with phpdock until you follow the recommendation below.

If you need to install more than one php in your system, make sure that the following conditions are met:
1. there is no HKLM\Programs\PHP\IniFilePath in the registry
2. there is no php.ini in Windows directory
3. there is no PHPRC environment variable (check with "set" command)

On the other hand, phpdock does not care what particular php version you run with it. You can use any version including one you have already installed. Make sure phpdock.ini points to appropriate php-cgi.exe (or php.exe in case of php version 4.x)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Feb 2008
Posts: 2
Reply with quote
I realize that this is a PHP configuration, not a PHPDock issue. Can you see why I'm concerned about deploying my applications using PHPDock into unknown environments? I ran into a support issue today where PHP had been previously installed on a system without PHPExpress. My application wouldn't run without PHPExpress so either I had to have PHPExpress installed in the other installation of PHP or I had to have the system use the PHP installation that came with my application. This is not good.

I know this can be done. I am using an application that uses its own copy of Apache and PHP, ignoring the previous installation of PHP even though the registry key specifies the IniFilePath. So both coexist with isolated copies of PHP. (The application is SugarCRM using the BitRock installer). I double checked with phpinfo() on both installations (one is IIS, the other was Apache). The registry key is specified and somehow the specialized Apache server is ignoring it. Do you think you could do something like that with PHPDock?

PHPDock really should be able to specify which copy of PHP to use.
View user's profileFind all posts by orzoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
Do you know any product released in 2007 or 2008 that sets IniFilePath in the registry?
Anyway, if phpdock sees that IniFilePath is set, it will ask user to allow its deletion. Same goes to PHPRC and php.ini in windows directory.
Regarding "its own custom way" for PhpDock, I think it's not possible for php to ignore IniFilePath without re-compiling php itself. Then you'll tell me that you need phpdock to support "standard" php because you want to update it yourself when new version is released and so forth.

Quote:
PHPDock really should be able to specify which copy of PHP to use.

and it's what you can specify in phpdock.ini

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 20 May 2009
Posts: 1
Reply with quote
3. there is no PHPRC environment variable (check with "set" command)

Could you please explain how I check this exactly, what's the 'set' command ?

Thanks!
View user's profileFind all posts by logaholicSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
"set" is "set", nothing else.
Open cmd and run set and it will show you all environment variables currently set.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] Specifying IniFilePath for php.ini
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic