GithubHelp home page GithubHelp logo

tomahoax / noveniniupdate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lolautruche/noveniniupdate

0.0 2.0 0.0 136 KB

eZ Publish extension allowing "environment switching". Very useful when INI settings are different between, for example, your dev server and your production server.

Home Page: http://projects.ez.no/noveniniupdate

PHP 100.00%

noveniniupdate's Introduction

NovenINIUpdate 3.0 Documentation

2009-2010 Jean-Luc Nguyen, Jerome Vieilledent

Introduction

This extension allows to update INI files from an XML source. It uses the INI API available in eZ Publish kernel. It is mostly useful for update INI files depending on the website environment. It provides a module to use in the backoffice and a CLI script. Cluster Mode is supported so that the index_cluster.php file will also be updated. Settings for cluster mode are separated in the XML file. config.php file is also supported.

Installation

  • Download the compressed file under extension/ directory and uncompress it.
  • Activate the extension.
  • Clear the caches
  • Re-build the class autoload array :

Shell

php bin/php/ezpgenerateautoloads.php -e -p

Configuration

Edit the XML file with your needs, which path is defined in extension/noveniniupdate/setting/noveniniupdate.ini, variable: XmlContent (please make an override). The XML sample is here: extension/noveniniupdate/source/sample.xml. Be sure to get the same XML structure, only values that are different depending on the environment and check all values. If you aren't using the Cluster Mode, you can ignore the <ClusterMode> tag in the XML file. Idem for config.php file, with <ConfigPHPFile> tag.

Warning

Some INI settings can be marked as read only in site.ini. Check site.ini [eZINISettings] / ReadonlySettingList[].

Default values are :

site.ini

[eZINISettings]
ReadonlySettingList[]
ReadonlySettingList[]=template.ini/PHP/PHPOperatorList
ReadonlySettingList[]=image.ini/ImageMagick/ExecutablePath
ReadonlySettingList[]=image.ini/ImageMagick/Executable

How to Use in the Backoffice

  • You should have a new INI Config tab on the backoffice.
  • Select the environment where to update the INI files defined on the XML file.
  • Listed environment can be limited with security policies (ie. if you want that developpers could only update to dev and preprod environment)
  • You may check the new values on the setup tab, under INI parameters.
  • If you want to make a backup of old files, check the backup checkbox
  • If everything's OK, click the Udpdate Environment button, under all listed INI parameters

How to use using the CLI script

The CLI script is located in extension/noveniniupdate/bin/php/noviniupdate.php It uses eZComponents Console Tools

Several options are available :
  • --list-envs : Lists all available environments
  • --env=VALUE --list-params : Lists all params configured for a given environment
  • --env=VALUE --diff : Shows differences between what is currently configured and what will be configured
  • --env=VALUE : Updates the INI files for the given environment
  • --backup : If used with --env option, creates a backup of your config files in your backup directory, defined in noveniniupdate.ini

noveniniupdate's People

Contributors

lolautruche avatar tomahoax avatar

Watchers

 avatar James Cloos avatar

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.