Skip to content

Commit

Permalink
adding mysql version check for the installer Fixes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Jan 7, 2010
1 parent 77bf781 commit 261c825
Showing 1 changed file with 41 additions and 32 deletions.
73 changes: 41 additions & 32 deletions infinitas/installer/controllers/install_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class InstallController extends InstallerAppController {
var $components = null;

var $phpVersion = '5.0';

var $sqlVersion = '4';

/**
* beforeFilter
Expand Down Expand Up @@ -71,41 +73,48 @@ function beforeFilter() {
function index() {
$this->set('title_for_layout', __('Installation: Welcome', true));
// core setup
$setup[] = array (
'label' => __('PHP version', true) . ' >= ' . $this->phpVersion . '.x',
'value' => phpversion() >= $this->phpVersion ? 'Yes' : 'No',
'desc' => 'Php ' . $this->phpVersion . '.x is recomended, although php 4.x may run Infinitas fine.'
);

$setup[] = array (
'label' => __('zlib compression support', true),
'value' => extension_loaded('zlib') ? 'Yes' : 'No',
'desc' => 'zlib is required for some of the functionality in Infinitas'
);
$setup = array(
array(
'label' => __('PHP version', true) . ' >= ' . $this->phpVersion . '.x',
'value' => phpversion() >= $this->phpVersion ? 'Yes' : 'No',
'desc' => 'Php ' . $this->phpVersion . '.x is recomended, although php 4.x may run Infinitas fine.'
),
array (
'label' => __('zlib compression support', true),
'value' => extension_loaded('zlib') ? 'Yes' : 'No',
'desc' => 'zlib is required for some of the functionality in Infinitas'
),
array (
'label' => __('MySQL support', true),
'value' => (function_exists('mysql_connect')) ? 'Yes' : 'No',
'desc' => 'Infinitas uses mysql for generating dynamic content. Other databases will follow soon.'
),
array (
'label' => __('MySQL Version', true). ' >= ' . $this->sqlVersion . '.x',
'value' => (substr(mysql_get_client_info(), 0, 1) >= 4) ? 'Yes' : 'No',
'desc' => 'Infinitas requires Mysql version >= '. $this->sqlVersion
)
);

$setup[] = array (
'label' => __('MySQL support', true),
'value' => (function_exists('mysql_connect')) ? 'Yes' : 'No',
'desc' => 'Infinitas uses mysql for generating dynamic content. Other databases will follow soon.'
);
// path status
$paths[] = array (
'path' => APP . 'config',
'writeable' => is_writable(APP . 'config') ? 'Yes' : 'No',
'desc' => 'This path needs to be writeable for Infinitas to complete the installation.'
);

$paths[] = array (
'path' => APP . 'tmp',
'writeable' => is_writable(APP . 'tmp') ? 'Yes' : 'No',
'desc' => 'The tmp dir needs to be writable for caching to work in Infinitas.'
);
$paths = array(
array(
'path' => APP . 'config',
'writeable' => is_writable(APP . 'config') ? 'Yes' : 'No',
'desc' => 'This path needs to be writeable for Infinitas to complete the installation.'
),
array (
'path' => APP . 'tmp',
'writeable' => is_writable(APP . 'tmp') ? 'Yes' : 'No',
'desc' => 'The tmp dir needs to be writable for caching to work in Infinitas.'
),
array (
'path' => APP . 'webroot',
'writeable' => is_writable(APP . 'webroot') ? 'Yes' : 'No',
'desc' => 'This needs to be web accesible or your images and css will not be found.'
)
);

$paths[] = array (
'path' => APP . 'webroot',
'writeable' => is_writable(APP . 'webroot') ? 'Yes' : 'No',
'desc' => 'This needs to be web accesible or your images and css will not be found.'
);
// recomendations
$recomendations = array (
array (
Expand Down

0 comments on commit 261c825

Please sign in to comment.