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...")
(No difference)

Revision as of 03:26, 2 February 2015

Installing and upgrading on Windows Server 2008

TK

Installing and upgrading on Windows 7

PHP version 5.6

  • 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:
      date.timezone = "America/Los_Angeles" 
      [1]
    • 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

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