Upgrading PHP on Windows: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "== Installing and upgrading on Windows Server 2008 == ''TK'' == Installing and upgrading on Windows 7 == === PHP version 5.6 === * [http://windows.php.net/download/ Downlo...")
 
 
Line 18: Line 18:
* Check for other PHP-specific environment variables:<pre>> get-childitem env: select-string -pattern "php"</pre>
* Check for other PHP-specific environment variables:<pre>> get-childitem env: select-string -pattern "php"</pre>
* Edit the `php.ini` file.
* Edit the `php.ini` file.
** Set timezone:<pre>date.timezone = "America/Los_Angeles" </pre><ref>[date.timezone = "America/Los_Angeles" List of Supported Timezones/America], PHP Manual</ref>
** Set timezone:<ref>[date.timezone = "America/Los_Angeles" List of Supported Timezones/America], PHP Manual</ref><pre>date.timezone = "America/Los_Angeles" </pre>
** Set extensions directory: `extension_dir`
** Set extensions directory: `extension_dir`
** Uncomment needed extensions, such as `php_curl.dll`, `php_pdo_mysql.dll`, `php_mysql.dll`, `php_mysqli.dll`, etc.
** Uncomment needed extensions, such as `php_curl.dll`, `php_pdo_mysql.dll`, `php_mysql.dll`, `php_mysqli.dll`, etc.

Latest revision as of 03:26, 2 February 2015

Installing and upgrading on Windows Server 2008[edit]

TK

Installing and upgrading on Windows 7[edit]

PHP version 5.6[edit]

  • Download PHP for Windows.
    • Non-thread safe for development use on a desktop (as opposed to a machine running IIS).
    • Unzip the download and install in the root of the c: drive, e.g. c:\php56\.
  • Set the path to the php.ini file.
    • regedit > HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.6
    • String value: IniFilePath > c:\PHP56
    • (The path can simply be HKEY_LOCAL_MACHINE\SOFTWARE\PHP, or include the version: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5, or HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.6, or HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.6.5)
  • To use PHP from the command line, update the PATH environment variable.
    • Control Panel > System and Security > System > Advanced System Settings > Advanced tab > Environment Variables > System Variables > PATH
  • Check for other PHP-specific environment variables:
    > get-childitem env: select-string -pattern "php"
  • Edit the php.ini file.
    • Set timezone:[1]
      date.timezone = "America/Los_Angeles" 
    • Set extensions directory: extension_dir
    • Uncomment needed extensions, such as php_curl.dll, php_pdo_mysql.dll, php_mysql.dll, php_mysqli.dll, etc.

Notes[edit]

  1. [date.timezone = "America/Los_Angeles" List of Supported Timezones/America], PHP Manual