diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-09 16:34:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-09 16:34:40 +0000 |
commit | bcad40a05ab2dc2a341a3227e30b96668bce4500 (patch) | |
tree | 6fca27588d53a1b24705bd2834e9e643bb729bd1 /templates/show_test.inc | |
download | ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.tar.gz ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.tar.bz2 ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.zip |
New Import
Diffstat (limited to 'templates/show_test.inc')
-rw-r--r-- | templates/show_test.inc | 271 |
1 files changed, 271 insertions, 0 deletions
diff --git a/templates/show_test.inc b/templates/show_test.inc new file mode 100644 index 00000000..6bafa1da --- /dev/null +++ b/templates/show_test.inc @@ -0,0 +1,271 @@ +<?php +/* + + 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 2 + 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, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +$row_classes = array('even','odd'); +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> +<html lang="en-US"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Ampache -- Debug Page</title> +</head> +<body bgcolor="#f0f0f0"> +<h2><?php echo _("Ampache Debug"); ?></h2> +<p><?php echo _("You've reached this page because a configuration error has occured. Debug Information below"); ?></p> + +<table border="0" cellpadding="3" cellspacing="0"> +<tr> + <td><font size="+1"><?php echo _("CHECK"); ?></font></td> + <td> + <font size="+1"><?php echo _("STATUS"); ?></font> + </td> + <td><font size="+1"><?php echo _("DESCRIPTION"); ?></font></td> +</tr> +<tr> + <td valign="top"><?php echo _("PHP Version"); ?></td> + <td valign="top">[ + <? + if (!check_php_ver()) { + $status['php_ver'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['php_ver'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + <?php echo _("This tests to make sure that you are running a version of PHP that is known to work with Ampache."); ?> + </td> +</tr> +<tr> + <td valign="top"><?php echo _("Mysql for PHP"); ?></td> + <td valign="top">[ + <? + if (!check_php_mysql()) { + $status['mysql_php'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['mysql_php'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + <?php echo _("This test checks to see if you have the mysql extensions loaded for PHP. These are required for Ampache to work."); ?> + </td> +</tr> +<tr> + <td valign="top"><?php echo _("PHP Session Support"); ?></td> + <td valign="top">[ + <? + if (!check_php_session()) { + $status['session_php'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['session_php'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + <?php echo _("This test checks to make sure that you have PHP session support enabled. Sessions are required for Ampache to work."); ?> + </td> +</tr> +<tr> + <td valing="top"><?php echo _("PHP ICONV Support"); ?></td> + <td valing="top">[ + <? + if (!check_php_iconv()) { + $status['iconv_php'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['iconv_php'] = 'true'; + echo "<font color=\"green\"> OK </font> "; + } + ?>] + </td> + <td> + <?php echo _("This test checks to make sure you have Iconv support installed. Iconv support is not required for Ampache, but it is highly recommended"); ?> + </td> +</tr> +<tr> + <td valign="top"><?php echo _("Ampache.cfg.php Exists"); ?></td> + <td valign="top">[ + <? + if (!read_config_file($configfile)) { + $status['read_config'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['read_config'] = 'true'; + echo " <font color=\"green\"> OK   </font> "; + } + ?> + ] + </td> + <td width="350px"> + <?php echo _("This attempts to read /config/ampache.cfg.php If this fails either the ampache.cfg.php is not in the correct locations or + it is not currently readable by your webserver."); ?> + </td> +</tr> +<tr> + <td valign="top"> + <?php echo _("Ampache.cfg.php Configured?"); ?> + </td> + <td valign="top">[ + <? + $results = read_config($configfile, 0, 0); + if (!check_config_values($results)) { + $status['parse_config'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['parse_config'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + <?php echo _("This test makes sure that you have set all of the required config variables and that we are able to + compleatly parse your config file"); ?> + </td> +</tr> +<tr> + <td valign="top"> + <?php echo _("Ampache.cfg.php Up to Date?"); ?> + </td> + <td valign="top">[ + <?php + $difference = debug_compare_configs($configfile,$configfile . ".dist"); + if (count($difference)) { + $status['check_config_uptodate'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['check_config_uptodate'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + <?php if (count($difference)) { + if (!count($difference['conf'])) { $difference['conf'] = array(); } + if (!count($difference['libglue'])) { $difference['libglue'] = array(); } + echo _("Ampache.cfg.php is missing the following:"); + echo "<br />" . _("Under CONF") . "<br /><dl>\n"; + foreach ($difference['conf'] as $key=>$value) { + echo "\t<dd>$key = \"$value\"</dd>\n"; + } + echo "</dl>\n<br />" . _("Under LIBGLUE") . "<br /><dl>\n"; + foreach ($difference['libglue'] as $key=>$value) { + echo "\t<dd>$key = \"$value\"</dd>\n"; + } + echo "</dl><br />\n"; + } else { ?> + + <?php } ?> + </td> +</tr> +<tr> + <td valign="top"><?php echo _("DB Connection"); ?></td> + <td valign="top">[ + <? + $db = check_database($results['libglue']['local_host'], $results['libglue']['local_username'], $results['libglue']['local_pass'],$results['libglue']['local_db']); + if (!$db) { + $status['check_db'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['check_db'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + <?php echo _("This attempts to connect to your database using the values from your ampache.cfg.php"); ?> + </td> +</tr> +<tr> + <td valign="top">DB Inserted</td> + <td valign="top">[ + <? + $db_inserted = check_database_inserted($db,$results['libglue']['local_db']); + if (!$db_inserted) { + $status['check_db_insert'] = 'false'; + echo " <font color=\"red\">ERROR</font> "; + } + else { + $status['check_db_insert'] = 'true'; + echo " <font color=\"green\"> OK </font> "; + } + ?> + ] + </td> + <td> + This checks a few key tables to make sure that you have successfully inserted the ampache database and + that the user has access to the database + </td> +</tr> +<tr> + + <td valign="top">Web Path</td> + <td valign="top">[ + <? + /* + Check to see if this is Http or https + */ + if ($_SERVER['HTTPS'] == 'on') { + $http_type = "https://"; + } + else { + $http_type = "http://"; + } + $results['conf']['web_path'] = $http_type . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $results['conf']['web_path']; + if ($status['parse_config']) { + echo "<img src=\"" . $results['conf']['web_path'] ."/images/ampache.gif\" width=\"80\" height=\"15\"/>"; + } + else { + $status['check_webpath'] = false; + echo "<font color=\"red\">ERROR</font>"; + } + + ?> + ] + </td> + <td> + This test makes sure that your web_path variable is set correctly and that we are able to get to the index page. If you do not see the ampache + logo here then your web_path is not set correctly. + </td> +</tr> + +</table> + + + |