php_guy Posted September 12, 2007 Share Posted September 12, 2007 When using phpinfo() there is a property called "Config file path" that is displayed. How can I change this?? E.g. my path keeps showing C:\WINNT, but I want it to use the config file in C:\PHP. I tried modifying my environment PATH var so that C:\PHP comes first, but still no luck Any ideas? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/69082-phpinfo/ Share on other sites More sharing options...
wildteen88 Posted September 12, 2007 Share Posted September 12, 2007 What version of PHP are you using. If its PHP5.2.x then ignore that line instead refer to the other line beneath it (Loaded Configuration File). That line should show the full path to php.ini file PHP is using. If you don't see a Loaded Configuration File line or it is set to None then PHP is unable to find your php.ini. PHP cannot access its containing folder (C:/php). PHP only searches for the php.ini in C:/Windows or C:/Windows/system32, the registery via PHPRC or the Windows Path. The best method is to add the php folder to the Windows Path. That way PHP can read all files/folders within C:/php. If you have Apache2 as the server you can add PHPIniDir "C:/php" to the httpd.conf too, this basically tells PHP where the php.ini file can be found. Quote Link to comment https://forums.phpfreaks.com/topic/69082-phpinfo/#findComment-347296 Share on other sites More sharing options...
Barand Posted September 12, 2007 Share Posted September 12, 2007 From php.ini file ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overridden using ; the -c argument in command line mode. I haven't tried it myself but it suggests defining the path in environment variable PHPRC. OR, just replace ini file it's using with the one that you want to use, in the folder it is currently using Quote Link to comment https://forums.phpfreaks.com/topic/69082-phpinfo/#findComment-347304 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.