/**
* cmsdAm is a powerful, simple, scalable, quick, secure, GPL released, PHP4 written from scratch
* Content Management System framework. It is specially designed for people having some basic
* PHP knowledge. You can create powerful professional sites in a while using cmsdAm, and you
* don't have to rewrite each time php code for handle each section, users, search engine, ecc.
* cmsdAm do all the work for you! You just have to configure it, and write HTML or PHP code
* for your sections. You don't have to care about mails, HTTP headers, HTML strange tags, META
* tags, HTTP cache mechanisms, ecc, just write HTML or PHP code for your sections.
*
* Enjoy!!! Dino Ciuffetti - dam2k@users.sourceforge.net
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program (COPYING); if not, go to http://www.fsf.org/ or write
* to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*
*/
// Server CACHE check
$cache_ok = false;
while (true) { // :-) This is a great trick to have a break to stop code execution ... ;-)
$error = "Problema sconosciuto con MEMCACHED server";
include ("cache_check2.php");
// ******* Checking PHP Sockets support availability
$db_handle = "fsockopen";
if (!is_callable($db_handle)) { // Socket support is NOT available
echo "
Supporto socket in PHP
";
echo "Problema: Problemi con il supporto Socket in PHP, impossibile continuare l'installazione
";
echo "Soluzione: Controllare se l'interprete PHP e' configurato con il supporto Socket.
";
break;
} // Socket support is available
echo "
Supporto Socket in PHP
";
ob_flush();
flush();
// ******* Checking Memcached connection
$memcache_handle = cache_conn ($memcached_servers, $memcached_port);
if ($memcache_handle === false) {
echo "
Connessione al server Memcached
";
echo "Problema: Problemi con il server Memcached.
";
echo "Soluzione: Controllare se il nome dell'host o l'indirizzo IP del server Memcached sono impostati correttamente e che il server sia up e accetta correttamente le connessioni.
";
//echo "Errore del server: $error";
break;
}
echo "
Connessione al server Memcached
";
ob_flush();
flush();
// ******* Checking Memcached server
$memcache_handle = cache_add ($memcached_servers, $memcached_port);
if ($memcache_handle === false) {
echo "
Aggiunta al server Memcached
";
echo "Problema: Problemi con il server Memcached.
";
echo "Soluzione: Controllare se la versione di Memcached appartiene ai prerequisiti di cmsdam e che il server sia up e accetta correttamente le connessioni.
";
echo "Errore: $error
";
//echo "Errore del server: $error";
break;
}
if ($memcache_handle == "warn") {
echo "
Aggiunta al server Memcached: $error
";
ob_flush();
flush();
} else {
echo "
Aggiunta al server Memcached: $error
";
ob_flush();
flush();
}
// ******* Checking Memcached server
$memcache_handle = cache_del ($memcached_servers, $memcached_port);
if ($memcache_handle === false) {
echo "
Cancellazione dal server Memcached
";
echo "Problema: Problemi con il server Memcached.
";
echo "Soluzione: Controllare se la versione di Memcached appartiene ai prerequisiti di cmsdam e che il server sia up e accetta correttamente le connessioni.
";
echo "Errore: $error
";
//echo "Errore del server: $error";
break;
}
if ($memcache_handle == "warn") {
echo "
Cancellazione dal server Memcached: $error
";
ob_flush();
flush();
} else {
echo "
Cancellazione dal server Memcached: $error
";
ob_flush();
flush();
}
// We are OK with MEMCACHED
$cache_ok = true;
break;
}
//!! $cache_ok variable contains TRUE if SERVER CACHE is OK, FALSE on errors
?>