Creating Your PHP Configuration File php.ini


How to create your PHP configuration file, php.ini?


If you have followed our Installing PHP Engine tutorial, you may need to use this tutorial to create PHP configuration file, php.ini. This tutorial assumes that your PHP engine is installed at: C:\Program Files\php-5.2.0-Win32.

1. Check to see if you already have a PHP configuration file or not: C:\Program Files\php-5.2.0-Win32\php.ini.

2. If not copy C:\Program Files\php-5.2.0-Win32\php.ini-recommended to C:\Program Files\php-5.2.0-Win32\php.ini

3. Open this file php.ini with "notepad". You will see some text like this:


; 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. 

4. To add a new environment variable called PHPRC as mentioned above, Right mouse click My Computer, and select Properties. The System Properties dialog box shows up.

5. Click the Advanced tab, then click the Environment Variables button. The Environment Variables dialog box shows up.

6. In the System variable section, click the New button. The New System Variable dialog box shows up.

7. Enter PHPRC as the name and C:\Program Files\php-5.2.0-Win32 as the value as shown in the picture below: PHPRC Environment Variable

2006-12-08, 34957🔥, 0💬