Jump to content

Recommended Posts

http://www.php.net/manual/en/configuration.file.php

 

 

If it's loaded as an Apache module, you can set the PHPIniDir option.

 

Example (this would go in httpd.conf or a file included by httpd.conf):

 

PHPIniDir "/Path/To/PHP/Folder/"

 

 

 

Or you could set the PHPRC environmental variable.  (That should be explained on that linked page.)

Link to comment
https://forums.phpfreaks.com/topic/165245-phpini-location/#findComment-871434
Share on other sites

1. SAPI module specific location

* PHPIniDir directive in Apache 2

* -c command line option in CGI and CLI

* php_ini parameter in NSAPI

* PHP_INI_PATH environment variable in THTTPD

2. The PHPRC environment variable (Before PHP 5.2.0 this was checked after the registry key mentioned below.)

3. HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)

4. Current working directory (for CLI)

5. The web server’s directory (for SAPI modules)

6. Directory of PHP (If Windows)

7. Windows directory (C:\windows or C:\winnt)

8. –with-config-file-path compile time option

 

The path in which the php.ini file is looked for can be overridden using the -c argument in command line mode. (cgi) /home/user1/htdocs/cgi-bin/php.cgi -c /home/user1/php.ini

 

the PHPRC is a system environment variable

Link to comment
https://forums.phpfreaks.com/topic/165245-phpini-location/#findComment-871441
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.