Code Monkey home page Code Monkey logo

php_updater's Introduction

php_updater

This tool help you to update your PHP installation for Windows.

Windows only ?

Yes, for Mac Os X You can use Homebrew or other distribution. For Linux, many distribution include PHP. Especially for Debian, the DotDeb project provide newer version.

Chocolatey provide PHP

Chocolatey is another way for install PHP on your Windows server. But the location is not customizable.

Base tree folder for Windows Server

This tree is not mandatory. All configuration is based on this tree.

drive (d:)
└── sites
    ├── log
    │   ├── php56
    │   └── php70
    ├── tmp
    ├── tmp_soap
    ├── tools
    │   ├── ansicon
    │   ├── apache24
    │   ├── git19
    │   ├── php56
    │   ├── php56_backup
    │   ├── php70
    │   ├── php_tool
    │   └── svn19
    └── www_root

Requirements

Git 1.9 or newer installed and available without full qualified path. The prerequire for PHP installed. By example VC11 for PHP 5.6 or VC14 for PHP 7.

Install the Tool

  • Clone this repos into sites/tools/php_updater
  • Open Ansicon and go to install folder.
  • Execute make_tree.bat
  • Download PHP 5.6.13+ for Windows or newer and unzip into sites/tools/php_updater/php folder.
  • Configure this sites/tools/php_updater/php/php.ini the TimeZone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Paris
  • Set the extension directory
; On windows:
extension_dir = "ext"
  • Enable this extensions :
    • php_bz2
    • php_curl
    • php_fileinfo
    • php_gmp
    • php_intl
    • php_mbstring
    • php_openssl
[...]
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll      ; Must be after mbstring as it depends on it
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
[...]

Configure

Open ansicon and go to sites/tools/php_updater. Launch self_install.bat

This script download the composer.phar, install the vendor dependencies and run the configuration command.

Please enter the temporary folder : d:\sites\tmp
Please enter the PHP folder : d:\sites\tools\php56
Please enter the backup folder : d:\sites\tools\php56_backup
PHP branch : php56_nts
Configuration  end. Use 'config:show' command for check configuration.

For the php branch, read the file config/sources.yml

PHP version NTS or TS Arch Branch
5.6 TS x86 php56
5.6 NTS x86 php56_nts
5.6 TS x64 php56_x64
5.6 NTS x64 php56_x64_nts
PHP version NTS or TS Arch Branch
7.0 TS x86 php70
7.0 NTS x86 php70_nts
7.0 TS x64 php70_x64
7.0 NTS x64 php70_x64_nts
PHP version NTS or TS Arch Branch
7.1 TS x86 php71
7.1 NTS x86 php71_nts
7.1 TS x64 php71_x64
7.1 NTS x64 php71_x64_nts

Use

Basic use

Open ansicon and go to sites/tools/php_updater. Launch update.bat

This script do :

  • Update php_updater from GitHub.
  • Update Composer
  • Install the eventualy vendor update
  • Install the lastest version of PHP branch set

Advansed use

Open ansicon and go to sites/tools/php_updater. Launch PhpUpdate.bat hor display help and all available command.

This version include :

  • Display config
  • Init config if not exists
  • Update PHP version
  • Display Current installed PHP version.

Q/A

You want clean the configuration ? Remove the config/config.yml file.

Why install PHP in this tool ? A PHP script cannot access in write mode in php.exe if in running.

Who to maintain the integrated PHP version ? It is not necessary to maintain the integrated PHP up to date because it is not used in production by the server. Only the update tools used.

Contribute

Your contribution can help the community. Fork this repository, make change, and create a new pull request.

You ar not developer and you want help. Make a new issue.

Thank in advance for your help.

php_updater's People

Contributors

macintoshplus avatar

Watchers

 avatar  avatar

php_updater's Issues

php:update for all install

Allow use command php:update without install name and many installation.

With --no-install can display all install.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.