| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
require_once( 'version.php' ); |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
include_once( 'common.php' ); |
|---|
| 13 |
|
|---|
| 14 |
function get_php_setting($val) { |
|---|
| 15 |
$r = (ini_get($val) == '1' ? 1 : 0); |
|---|
| 16 |
return $r ? 'ON' : 'OFF'; |
|---|
| 17 |
} |
|---|
| 18 |
|
|---|
| 19 |
function writableCell( $folder ) { |
|---|
| 20 |
echo '<tr>'; |
|---|
| 21 |
echo '<td class="item">' . $folder . '</td>'; |
|---|
| 22 |
echo '<td align="left">'; |
|---|
| 23 |
echo is_writable( "../$folder" ) ? '<b><font color="green">Scrivibile</font></b>' : '<b><font color="red">Non Scrivibile</font></b>' . '</td>'; |
|---|
| 24 |
echo '</tr>'; |
|---|
| 25 |
} |
|---|
| 26 |
include("header.php"); |
|---|
| 27 |
|
|---|
| 28 |
?> |
|---|
| 29 |
<div id="ctr" align="center"> |
|---|
| 30 |
|
|---|
| 31 |
<div class="install"> |
|---|
| 32 |
<div id="stepbar"> |
|---|
| 33 |
<div class="step-on">inizio</div> |
|---|
| 34 |
<div class="step-off">licenza</div> |
|---|
| 35 |
<div class="step-off">passo 1</div> |
|---|
| 36 |
<div class="step-off">passo 2</div> |
|---|
| 37 |
<div class="step-off">passo 3</div> |
|---|
| 38 |
<div class="step-off">passo 4</div> |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
</div> |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
<div id="right"> |
|---|
| 45 |
|
|---|
| 46 |
<div id="step">Controllo pre-installazione</div> |
|---|
| 47 |
|
|---|
| 48 |
<div class="far-right"> |
|---|
| 49 |
<input name="Button2" type="submit" class="button" value="Avanti >>" onclick="window.location='install.php';" /> |
|---|
| 50 |
<br/> |
|---|
| 51 |
<br/> |
|---|
| 52 |
<input type="button" class="button" value="Ricontrolla" onclick="window.location=window.location" /> |
|---|
| 53 |
</div> |
|---|
| 54 |
<div class="clr"></div> |
|---|
| 55 |
|
|---|
| 56 |
<h1>Controllo pre-installazione per:<br/><?php echo $version; ?></h1> |
|---|
| 57 |
<div class="install-text"> |
|---|
| 58 |
Se qualcuno dei seguenti oggetti e' segnalato in rosso |
|---|
| 59 |
cerca di correggerli. |
|---|
| 60 |
<br/> |
|---|
| 61 |
I file di configurazione creati saranno due : |
|---|
| 62 |
uno per la dir "client" |
|---|
| 63 |
per la visualizzazione dei risultati, uno per la dir "admin" per |
|---|
| 64 |
l'amministrazione di Eleonline.<br/><b>Admin</b>:<br/> |
|---|
| 65 |
si consiglia per la sicurezza di non rendere pubblica la parte di amministrazione e |
|---|
| 66 |
dividerla mettendola su un server locale, con aggiornamento del db con replica o in altro modo.<br/> |
|---|
| 67 |
In questo caso, una volta creati file di configurazione, modificare |
|---|
| 68 |
le variabili di accesso al database perche' lavori in locale.<br/><b>Client</b>:<br/> |
|---|
| 69 |
Si consiglia inoltre di creare un utente mysql con permessi limitati alla sola lettura per la parte "client" in quanto pubblica e quindi di modificare a mano successivamente il file config. |
|---|
| 70 |
|
|---|
| 71 |
<div class="ctr"></div> |
|---|
| 72 |
</div> |
|---|
| 73 |
|
|---|
| 74 |
<div class="install-form"> |
|---|
| 75 |
<div class="form-block"> |
|---|
| 76 |
|
|---|
| 77 |
<table class="content"> |
|---|
| 78 |
<tr> |
|---|
| 79 |
<td class="item"> |
|---|
| 80 |
- versione PHP >= 4.3.0 |
|---|
| 81 |
</td> |
|---|
| 82 |
<td align="left"> |
|---|
| 83 |
<?php echo phpversion() < '4.3' ? '<b><font color="red">No</font></b>' : '<b><font color="green">Si</font></b>';?> |
|---|
| 84 |
</td> |
|---|
| 85 |
</tr> |
|---|
| 86 |
|
|---|
| 87 |
<tr> |
|---|
| 88 |
<td> |
|---|
| 89 |
- supporto GD graphics |
|---|
| 90 |
</td> |
|---|
| 91 |
<td align="left"> |
|---|
| 92 |
<?php echo extension_loaded('gd') ? '<b><font color="green">Disponibile</font></b>' : '<b><font color="red">Non Disponibile</font></b>';?> |
|---|
| 93 |
</td> |
|---|
| 94 |
</tr> |
|---|
| 95 |
<tr> |
|---|
| 96 |
<td> |
|---|
| 97 |
- supporto MySQL |
|---|
| 98 |
</td> |
|---|
| 99 |
<td align="left"> |
|---|
| 100 |
<?php echo function_exists( 'mysql_connect' ) ? '<b><font color="green">Disponibile</font></b>' : '<b><font color="red">Non Disponibile</font></b>';?> |
|---|
| 101 |
</td> |
|---|
| 102 |
</tr> |
|---|
| 103 |
<tr> |
|---|
| 104 |
<td valign="top" class="item"> |
|---|
| 105 |
- file config.php Sito |
|---|
| 106 |
</td> |
|---|
| 107 |
<td align="left"> |
|---|
| 108 |
<?php |
|---|
| 109 |
if (@file_exists('../client/config.php') && @is_writable( '../client/config.php' )){ |
|---|
| 110 |
echo '<b><font color="green">Presente e Scrivibile</font></b>'; |
|---|
| 111 |
} else if (is_writable( '../client' )) { |
|---|
| 112 |
echo '<b><font color="green">Non Presente ma Scrivibile</font></b>'; |
|---|
| 113 |
} else { |
|---|
| 114 |
echo '<b><font color="red">Non Scrivibile o Non Presente</font></b><br /><span class="small">Puoi continuare ugualmente il processo di installazione. Alla fine ti verra\' mostrato il contenuto del config.php, quindi dovrai fare il copia & incolla di quello che ti verra\' mostrato salvarlo in un file da immettere nella root pubblica (dir client) del sito nominandolo "config.php"</span>'; |
|---|
| 115 |
} ?> |
|---|
| 116 |
</td> |
|---|
| 117 |
</tr> |
|---|
| 118 |
<tr> |
|---|
| 119 |
<td valign="top" class="item"> |
|---|
| 120 |
- file config.php Amministrazione |
|---|
| 121 |
</td> |
|---|
| 122 |
<td align="left"> |
|---|
| 123 |
<?php |
|---|
| 124 |
if (@file_exists('../admin/config.php') && @is_writable( '../admin/config.php' )){ |
|---|
| 125 |
echo '<b><font color="green">Presente e Scrivibile</font></b>'; |
|---|
| 126 |
} else if (is_writable( '../admin' )) { |
|---|
| 127 |
echo '<b><font color="green">Non Presente ma Scrivibile</font></b>'; |
|---|
| 128 |
} else { |
|---|
| 129 |
echo '<b><font color="red">Non Scrivibile</font></b><br /><span class="small">Puoi continuare ugualmente il processo di installazione. Alla fine ti verra\' mostrato il contenuto del config.php, quindi dovrai fare il copia & incolla di quello che ti verra\' mostrato e copiarlo in un file nominandolo "config.php" e salvandolo nella dir admin di eleonline.</span>'; |
|---|
| 130 |
} ?> |
|---|
| 131 |
</td> |
|---|
| 132 |
</tr> |
|---|
| 133 |
</table> |
|---|
| 134 |
</div> |
|---|
| 135 |
</div> |
|---|
| 136 |
<div class="clr"></div> |
|---|
| 137 |
|
|---|
| 138 |
<h1>Settaggi Raccomandati:</h1> |
|---|
| 139 |
<div class="install-text"> |
|---|
| 140 |
Questi sono i settaggi raccomandati per il PHP per assicurarsi la piena |
|---|
| 141 |
compatibilita' con Eleonline. |
|---|
| 142 |
<br /> |
|---|
| 143 |
Comunque, Eleonline puo' funzionare anche se i settaggi non sono quelli raccomandati |
|---|
| 144 |
<div class="ctr"></div> |
|---|
| 145 |
</div> |
|---|
| 146 |
|
|---|
| 147 |
<div class="install-form"> |
|---|
| 148 |
<div class="form-block"> |
|---|
| 149 |
|
|---|
| 150 |
<table class="content"> |
|---|
| 151 |
<tr> |
|---|
| 152 |
<td class="toggle"> |
|---|
| 153 |
Direttiva |
|---|
| 154 |
</td> |
|---|
| 155 |
<td class="toggle"> |
|---|
| 156 |
Raccomandata |
|---|
| 157 |
</td> |
|---|
| 158 |
<td class="toggle"> |
|---|
| 159 |
Attuale |
|---|
| 160 |
</td> |
|---|
| 161 |
</tr> |
|---|
| 162 |
<?php |
|---|
| 163 |
$php_recommended_settings = array( |
|---|
| 164 |
array ('Magic Quotes GPC','magic_quotes_gpc','ON'), |
|---|
| 165 |
array ('Register Globals','register_globals','OFF'), |
|---|
| 166 |
array ('Session auto start','session.auto_start','OFF'), |
|---|
| 167 |
); |
|---|
| 168 |
|
|---|
| 169 |
foreach ($php_recommended_settings as $phprec) { |
|---|
| 170 |
?> |
|---|
| 171 |
<tr> |
|---|
| 172 |
<td class="item"><?php echo $phprec[0]; ?>:</td> |
|---|
| 173 |
<td class="toggle"><?php echo $phprec[2]; ?>:</td> |
|---|
| 174 |
<td> |
|---|
| 175 |
<?php |
|---|
| 176 |
if ( get_php_setting($phprec[1]) == $phprec[2] ) { |
|---|
| 177 |
?> |
|---|
| 178 |
<font color="green"><b> |
|---|
| 179 |
<?php |
|---|
| 180 |
} else { |
|---|
| 181 |
?> |
|---|
| 182 |
<font color="red"><b> |
|---|
| 183 |
<?php |
|---|
| 184 |
} |
|---|
| 185 |
echo get_php_setting($phprec[1]); |
|---|
| 186 |
?> |
|---|
| 187 |
</b></font> |
|---|
| 188 |
<td> |
|---|
| 189 |
</tr> |
|---|
| 190 |
<?php |
|---|
| 191 |
} |
|---|
| 192 |
?> |
|---|
| 193 |
</table> |
|---|
| 194 |
</div> |
|---|
| 195 |
</div> |
|---|
| 196 |
<div class="clr"></div> |
|---|
| 197 |
</div> |
|---|
| 198 |
<div class="clr"></div> |
|---|
| 199 |
</div><div class="clr"></div> |
|---|
| 200 |
</div><div class="clr"></div> |
|---|
| 201 |
</div><div class="clr"></div> |
|---|
| 202 |
</div> |
|---|
| 203 |
<?php include("footer.php"); ?> |
|---|
| 204 |
|
|---|
| 205 |
</body> |
|---|
| 206 |
</html> |
|---|
| 207 |
|
|---|