Home « Server software «
Documentation: setup.php
setup.php - The main setup script
This page is used for the very first installation of the serverThis script looks for following items:
shared/parameters.include.php
shared/hooks.include.php
skins/parameters.include.php
If all of these items are absent, the script assumes this is a first installation, welcomes the surfer, and offers to jump to control/configure.php.
Also, the script performs several test to ensure:
- that the version of PHP is greater or equal than 4.3
- that the MySQL PHP extension is available
- that the XML parser of PHP is available
- that it can write to local files (configuration and log files)
If one of these tests fails, the script advises the user on the right thing to do. For example, it will offer to chmod the YACS installation directory is necessary.
On first installation this script will behave like a setup assistant, and the user will have to pass through successive screens:
- the configuration panel (control/configure.php), to record database and other essential parameters
- the extension scanner (control/scan.php), to load all hooks
- the database setup (control/setup.php), to create tables in the database
- the populate screen (control/populate.php), to create a basic set of records in the database
- the configuration panel for skins (scripts/configure.php), to set rendering parameters
If at least one file is missing, the script assumes there is an on-going installation, and proposes to jump to the control panel at control/index.php. In this case the control panel will redirect to the adequate script depending of the missing element.
If all files are present, but there is no
switch.on
nor switch.off
file, the script
assumes the installation ends correctly, creates switch.on
, and offers to jump to the
control panel at control/index.php.
Also, if there is no index page at the upper directory level, the script will silently attempt
to duplicate index.php there.Else the script assumes there is no need for an installation, and offers to jump to the control panel at control/index.php.
This script is a reference file of this system.
Voir aussi:
- control/configure.php
- control/scan.php
- control/setup.php
- control/populate.php
- scripts/configure.php
- control/index.php
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com