* * 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; either version 3 of the License, or * (at your option) any later version. * * 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. If not, see . */ /** * \file htdocs/admin/system/perf.php * \brief Page to show Performance information */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; $langs->load("admin"); $langs->load("install"); $langs->load("other"); if (! $user->admin) accessforbidden(); if (GETPOST('action') == 'donothing') { exit; } /* * View */ $form=new Form($db); $nowstring=dol_print_date(dol_now(),'dayhourlog'); llxHeader(); print_fiche_titre($langs->trans("PerfDolibarr"),'','setup'); print $langs->trans("YouMayFindPerfAdviceHere",'http://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').' ('.$langs->trans("Reload").')
'; // XDebug print '
'; print ''.$langs->trans("XDebug").': '; $test=!function_exists('xdebug_is_enabled'); if ($test) print img_picto('','tick.png').' '.$langs->trans("NotInstalled"); else { print img_picto('','warning').' '.$langs->trans("XDebugInstalled"); print $langs->trans("MoreInformation").' XDebug admin page'; } print '
'; // Applicative cache print '
'; print ''.$langs->trans("ApplicativeCache").': '; $test=!empty($conf->memcached->enabled); if ($test) { if (!empty($conf->global->MEMCACHED_SERVER)) { print img_picto('','tick.png').' '.$langs->trans("MemcachedAvailableAndSetup"); print $langs->trans("MoreInformation").' Memcached module admin page'; } else { print img_picto('','warning').' '.$langs->trans("MemcachedModuleAvailableButNotSetup"); } } else print img_picto('','warning').' '.$langs->trans("MemcachedNotAvailable"); print '
'; // OPCode cache print '
'; print ''.$langs->trans("OPCodeCache").': '; $test1=function_exists('xcache_info'); if ($test1) { print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled"); print $langs->trans("MoreInformation").' Xcache admin page'; } else { $test2=function_exists('eaccelerator_info'); if ($test2) print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); else print $langs->trans("NoOPCodeCacheFound"); } print '
'; // HTTPCacheStaticResources print ''; print '
'; print ''.$langs->trans("HTTPCacheStaticResources").' - '; print $langs->trans("CacheByServer").':
'; // No cahce on PHP //print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'php (.php)').'
'; //print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeNotCached",'php (.php)').'
'; // Cache on rest print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCached",'css (.css)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCached",'css (.css)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCached",'css (.css.php)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCached",'css (.css.php)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCached",'img (.png)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCached",'img (.png)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCached",'javascript (.js)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCached",'javascript (.js)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCached",'javascript (.js.php)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCached",'javascript (.js.php)').'
'; print '
'; print ''.$langs->trans("HTTPCacheStaticResources").' - '; print $langs->trans("CacheByClient").':
'; print $langs->trans("TestNotPossibleWithCurrentBrowsers").'
'; // Compressions print '
'; print ''.$langs->trans("CompressionOfResources").': '; //$tmp=getURLContent(DOL_URL_ROOT.'/index.php','GET');var_dump($tmp); print '
'; // on PHP print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'php (.php)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'php (.php)').'
'; // on rest print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'css (.css)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'css (.css)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'css (.css.php)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'css (.css.php)').'
'; //print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'img (.png)').'
'; //print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'img (.png)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'javascript (.js)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'javascript (.js)').'
'; print '
'.img_picto('','tick.png').' '.$langs->trans("FilesOfTypeCompressed",'javascript (.js.php)').'
'; print '
'.img_picto('','warning.png').' '.$langs->trans("FilesOfTypeNotCompressed",'javascript (.js.php)').'
'; // Database driver print '
'; print ''.$langs->trans("DriverType").': '; print '
'; if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') { $test=($conf->db->type == 'mysqli'); if ($test) { print img_picto('','tick.png').' '.$langs->trans("YouUseBestDriver",$conf->db->type); } else { print img_picto('','warning.png').' '.$langs->trans("YouDoNotUseBestDriver",$conf->db->type,'mysqli'); } print '
'; } // Product search print '
'; print ''.$langs->trans("SearchOptim").': '; print '
'; $tab = array(); $sql = "SELECT COUNT(*) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $resql=$db->query($sql); if ($resql) { $limitforoptim=10000; $num=$db->num_rows($resql); if ($nb > $limitforoptim) { if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) { print img_picto('','warning.png').' '.$langs->trans("YouHaveXProductUseSearchOptim",$num); } else { print img_picto('','tick.png').' '.$langs->trans("YouHaveXProductAndSearchOptimOn",$num); } } else { print img_picto('','tick.png').' '.$langs->trans("NbOfProductIsLowerThanNoPb",$limitforoptim); } print '
'; $db->free($resql); } // Browser <<<<<<< HEAD print '
'; print ''.$langs->trans("Browser").': '; var_dump($conf->browser); print '
'; // Database statistics update print '
'; print ''.$langs->trans("DatabaseStatistics").': '; print '
'; ======= print '
'; print ''.$langs->trans("Browser").':
'; if (! in_array($conf->browser->name, array('chrome','opera','safari','firefox'))) { print img_picto('','warning.png').' '.$langs->trans("BrowserIsKO",$conf->browser->name); } else { print img_picto('','tick.png').' '.$langs->trans("BrowserIsOK",$conf->browser->name); } print '
'; // Database statistics update /* print '
'; print ''.$langs->trans("DatabaseStatistics").': '; print '
'; */ >>>>>>> 7485192cfbca23027d10cfdc41a33a14f332d23c llxFooter(); $db->close(); ?>