Jump to content

phpinfo


php_guy

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
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.