newb Posted July 8, 2009 Share Posted July 8, 2009 how do i change the Configuration File (php.ini) Path location after installation of php Quote Link to comment https://forums.phpfreaks.com/topic/165245-phpini-location/ Share on other sites More sharing options...
corbin Posted July 8, 2009 Share Posted July 8, 2009 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.) Quote Link to comment https://forums.phpfreaks.com/topic/165245-phpini-location/#findComment-871434 Share on other sites More sharing options...
MadTechie Posted July 8, 2009 Share Posted July 8, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/165245-phpini-location/#findComment-871441 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.