Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: scripts/index.php

scripts/index.php - Handling PHP scripts

While YACS is aiming to ease content publishing and sharing, we are thinking that the same objective should be targeted for the software itself.

More specifically, we have designed this module with the manipulation of numerous php script files in mind:

This module is based on several simple patterns:

Update your scripts from a remote reference repository

The remote reference pattern consists of scanning a remote server to build a set of staging files. After having setup the address of the reference server (through scripts/configure.php), the webmaster will have to activate the staging script (scripts/stage.php). The script will fetch the index of reference scripts (in footprints.php), and compare its content to the actual set of running scripts. For each running script having a diverging md5 signature, the script will cache the reference version into scripts/staging. As a result, at the end of the staging process:

After the staging step the update itself can take place by launching scripts/update.php. First of all, this script displays the list of staging files, and offer the opportunity to read the new version or to list differences. The diff algorithm has been implemented into scripts/scripts.php for that purpose. To actually update the system, scripts/update.php rename old versions as '.bak', and move new versions from the staging directory to their final location.

Aside from the new scripts other updates will take place thanks to following steps:

Make a reference repository of your running scripts

The local reference pattern consists of building a safe repository of scripts and of related information page. Once one server has been setup correctly, maybe after some script modifications, skin updates, etc., the webmaster (actually, any associate) may wish to freeze this configuration as the reference one. By activating the building script (scripts/build.php), he (or she) will copy reference scripts to a safe place (scripts/reference). These scripts will be scanned for structured comments (see scripts/phpdoc.php) and the related documentation will be generated automatically. An index of reference scripts, including file names, dates and an md5 hash code, will be generated as well for further checking by other servers. As a result, at the end of the building process:

How to define that a script is to be included in the reference set? Simple: put the keyword &arobas;reference on a single line of the first php comment of the script.

How to use these mechanisms in your particular situation?

Despite the simplicity of these patterns, we are quite confindent that most webmasters will appreciate them over time. At least, they enable smooth updates of running scripts for most (minor) modifications. Moreover, these patterns will successfully frequent models of web deployments: of useful pages to document the software. Note that these pages are fully indexed to enable free-text searches. checking from time to time one the public reference servers. that various organizations will develop additional scripts on the YACS platform. They may use the remote reference pattern to distribute these scripts internally to slave servers.

This script is a reference file of this system.

Licence: GNU Lesser General Public License

Auteurs:

Tools
Browse the source of this script
Server software