summaryrefslogtreecommitdiffstats
path: root/templates/show_test.inc.php
blob: fcd6c703d27c90f671f46626364255b2b0eead3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?php
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
/**
 *
 * LICENSE: GNU General Public License, version 2 (GPLv2)
 * Copyright 2001 - 2013 Ampache.org
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License v2
 * as published by the Free Software Foundation.
 *
 * 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.
 *
 */
?>
<!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=utf-8" />
<title>Ampache -- Debug Page</title>
<link rel="stylesheet" href="templates/install.css" type="text/css" media="screen" />
</head>
<body bgcolor="#f0f0f0">
<div id="header">
<h1><?php echo T_('Ampache Debug'); ?></h1>
<p><?php echo T_('You may have reached this page because a configuration error has occured. Debug information is below.'); ?></p>
</div>
<div>
<table align="center" cellpadding="3" cellspacing="0">
<tr>
    <td><font size="+1"><?php echo T_('CHECK'); ?></font></td>
    <td>
        <font size="+1"><?php echo T_('STATUS'); ?></font>
    </td>
    <td><font size="+1"><?php echo T_('DESCRIPTION'); ?></font></td>
</tr>
<tr>
    <td valign="top"><?php echo T_('PHP version'); ?></td>
    <td valign="top">[
    <?php
        if (!check_php_ver()) {
            echo debug_result('',false);
            if (function_exists('hash_algos')) { $algos = hash_algos(); }
            $string = "<strong>" .  phpversion() . " " . T_('Hash Function Exists') . " " . print_bool(function_exists('hash_algos')) . " " . T_('SHA256 Support') . " " . print_bool(in_array('sha256',$algos)) . "</strong>";
        }
        else {
            echo debug_result('',true);
        }
    ?>
    ]
    </td>
    <td>
    <?php echo T_('This tests whether you are running at least the minimum version of PHP required by Ampache.'); ?>
    <?php echo $string; ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_('PHP session extension'); ?></td>
    <td valign="top">[
    <?php
        if (!check_php_session()) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>
    ]
    </td>
    <td>
    <?php echo T_('This tests whether you have the session extension enabled. This extension is required by Ampache.'); ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_('PHP iconv extension'); ?></td>
    <td valign="top">[
    <?php
        if (!UI::check_iconv()) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>]
    </td>
    <td>
    <?php echo T_('This tests whether you have the iconv extension enabled. This extension is required by Ampache.'); ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_('PHP safe mode disabled'); ?></td>
    <td valign="top">[
    <?php
        if (!check_safemode()) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>]
    </td>
    <td>
    <?php echo T_('This test makes sure that PHP is not running in safe mode.  Some features of Ampache will not work correctly in safe mode.'); ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_('PHP memory limit override'); ?></td>
    <td valign="top">[
    <?php echo debug_result('', check_override_memory()); ?>]
    </td>
    <td>
    <?php echo T_('This tests whether Ampache can override the memory limit.  This is not strictly necessary, but may result in a better experience.'); ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_('PHP execution time override'); ?></td>
    <td valign="top">[
    <?php echo debug_result('', check_override_exec_time()); ?>]
    </td>
    <td>
    <?php echo T_('This tests whether Ampache can override the limit on maximum execution time.  This is not strictly necessary, but may result in a better experience.'); ?>
    </td>
</tr>    
<tr>
    <td valign="top"><?php echo T_('Configuration file readability'); ?></td>
    <td valign="top">[
    <?php
        if (!is_readable($configfile)) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>
    ]
    </td>
    <td width="350px">
    <?php echo T_('This test attempts to read config/ampache.cfg.php. If this fails the file either is not in the correct location or is not currently readable.'); ?>
    </td>
</tr>
<tr>
    <td valign="top">
        <?php echo T_('Configuration file validity'); ?>
    </td>
    <td valign="top">[
    <?php
        $results = @parse_ini_file($configfile);
        Config::set_by_array($results);
        if (!check_config_values($results)) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>
    ]
    </td>
    <td>
    <?php echo T_("This test makes sure that you have set all of the required configuration variables and that we are able to completely parse your config file."); ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_("Database connection"); ?></td>
    <td valign="top">[
    <?php
        if (!Dba::check_database()) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>
    ]
    </td>
    <td>
    <?php echo T_('This attempts to connect to your database using the values read from your configuration file.'); ?>
    </td>
</tr>
<tr>
    <td valign="top"><?php echo T_('Database tables'); ?></td>
    <td valign="top">[
    <?php
        $db_inserted = Dba::check_database_inserted();
        if (!$db_inserted) {
            echo debug_result('',false);
        }
        else {
            echo debug_result('',true);
        }
    ?>
    ]
    </td>
    <td>
    <?php echo T_('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"><?php echo T_('Web path'); ?></td>
    <td valign="top">[
    <?php
        if ($results['force_ssl']) {
            $http_type = 'https://';
        }

        $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . Config::get('web_path');
        if (check_config_values($results)) {
            echo "&nbsp;&nbsp;&nbsp;<img src=\"" . $results['web_path'] ."/images/icon_enable.png\" />&nbsp;&nbsp;&nbsp;";
        }
        else {
            echo debug_result('',false);
        }

    ?>
    ]
    </td>
    <td>
    <?php echo T_('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 a check mark here then your web_path is not set correctly.'); ?>
    </td>
</tr>
</table>
</div>
<div id="bottom">
<p><strong>Ampache Debug.</strong><br />
Pour l'Amour de la Musique.</p>
</div>
</body>
</html>