$_REQUEST['url'],
'name' => $_REQUEST['title'],
'items' => 10,
'shuffle' => 0,
'refresh' => 240,
'cache' => 10,
'nohtml' => 0,
'postmaxlength' => 0,
'cachedir' => './cache'
);
$CreatePlanetConfig = new PlanetConfig($config);
$save['config'] = file_put_contents(dirname(__FILE__).'/custom/config.yml', $CreatePlanetConfig->toYaml());
//Save password
$save['password'] = file_put_contents(dirname(__FILE__).'/admin/inc/pwd.inc.php', '');
if (0 != ($save['config'] + $save['password'])) {
$status = 'installed';
}
} else {
//Requirements
$tests = array(
'php5' => array(
'file' => false,
'label' => 'Server is running PHP5',
'solution' => 'Check your server documentation to activate PHP5.',
'result' => phpversion() >= 5
),
'custom' => array(
'file' => '/custom',
'label' => './custom
is writable',
'solution' => 'Change the access rights for ./custom
with CHMOD'
),
'opml' => array(
'file' => '/custom/people.opml',
'label' => './custom/people.opml
is writable',
'solution' => 'Change the access rights for ./custom/people.opml
with CHMOD'
),
'changepassword' => array(
'file' => '/admin/inc/pwd.inc.php',
'label' => 'Administrator password can be changed',
'solution' => 'Change the access right for ./admin/inc/pwd.inc.php
with CHMOD'
),
'cache' => array(
'file' => '/cache',
'label' => './cache
is writable',
'solution' => 'Make ./cache
writable with CHMOD'
),
);
foreach ($tests as $k => $v) {
// test file requirements, exclude php5 test
if ($tests[$k]['file']) {
if(is_writable(dirname(__FILE__) . $tests[$k]['file'])) {
$tests[$k]['result'] = true;
} else {
$tests[$k]['result'] = false;
}
}
}
$bInstallOk = true;
$strInstall = '';
$strRecommendation = '';
foreach ($tests as $test) {
$bInstallOk = $bInstallOk && $test['result'];
$strInstall .= "
Test | Result |
---|
To install moonmoon, try the following changes:
Congratulations! Your moonmoon is ready.
install.php
with your FTP software.