HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/freecams1.com/public_html/admin/server_status.php
<? require "header.php"; ?>

<div class="content-page">

    <div class="header-area">
        <div class="breadcrumbs">  
            <a href="index.php">Admin Home</a>          
        </div>
    </div>

    <div class="content-outer">

        <h2>Server<strong>Status</strong></h2>

        <?
        $loadresult = @exec('uptime');
        preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/", $loadresult, $avgs);
        $uptime = explode(' up ', $loadresult);
        $uptime = explode(',', $uptime[1]);
        $uptime = $uptime[0] . ', ' . $uptime[1];
        ?>

        <table class="system-status-report">
            <tbody>
                <tr class="ok">
                    <th>MySQL</th>
                    <td><? echo(dbValue("SHOW VARIABLES LIKE \"version\"",'Value')); ?></td>
                </tr>
                <tr class="ok">
                    <th>PHP</th>
                    <td><? echo phpversion(); ?></td>
                </tr>
                <tr class="ok">
                    <th>System Time</th>
                    <td><? echo date('Y-m-d H:i:s'); ?></td>
                </tr>
                <tr class="ok">
                    <th>MySQL Time</th>
                    <td><? echo dbValue("SELECT NOW() AS `time`", 'time'); ?></td>
                </tr>
                <tr class="ok">
                    <th>Disk Space</th>
                    <td><pre><? echo shell_exec("df -h"); ?></pre></td>
                </tr>
                <tr class="ok">
                    <th>RAM</th>
                    <td><pre><? echo shell_exec("free"); ?></pre></td>
                </tr>

                <tr><th></th><td><strong>PATHS</strong></td></tr>

                <? $res = file_exists($config['convert_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CONVERT</th>
                    <? if ($res === true) { ?>
                        <td>Path to ImageMagick's <b>convert</b> command is correct (<em><? echo $config['convert_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to ImageMagick's <b>convert</b> command</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['mogrify_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>MOGRIFY</th>
                    <? if ($res === true) { ?>
                        <td>Path to ImageMagick's <b>mogrify</b> command is correct (<em><? echo $config['mogrify_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to ImageMagick's <b>mogrify</b> command</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['php_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>PHP CLI BINARY</th>
                    <? if ($res === true) { ?>
                        <td>Path to PHP CLI is correct (<em><? echo $config['php_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to PHP CLI</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['ffmpeg_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>FFMPEG Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to FFMPEG is correct (<em><? echo $config['ffmpeg_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to FFMPEG</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['yamdi_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>Yamdi Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to Yamdi is correct (<em><? echo $config['yamdi_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to Yamdi</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['wget_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>WGET Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to WGET is correct (<em><? echo $config['wget_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to WGET</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['mp4box_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>MP4Box Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to MP4Box is correct (<em><? echo $config['mp4box_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to MP4Box</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['convert_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>ImageMagick Convert Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to ImageMagick Convert is correct (<em><? echo $config['convert_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to ImageMagick Convert</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['mogrify_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>ImageMagick Mogrify Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to ImageMagick Mogrify is correct (<em><? echo $config['mogrify_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to ImageMagick Mogrify</td>
                    <? } ?>
                </tr>

                <? $res = file_exists($config['handbrake_path']); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>HandBrakeCLI Path</th>
                    <? if ($res === true) { ?>
                        <td>Path to HandBrakeCLI is correct (<em><? echo $config['handbrake_path']; ?></em>).</td>
                    <? } else { ?>
                        <td>Missing or incorrect path to HandBrakeCLI</td>
                    <? } ?>
                </tr>

                <tr><th></th><td><strong>PHP INFO</strong></td></tr>

                <? $res = extension_loaded('mbstring'); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>PHP Extension:</th>
                    <? if ($res === true) { ?>
                        <td><b>mbstring</b> extension is enabled.</td>
                    <? } else { ?>
                        <td><b>mbstring</b> extension is missing.</td>
                    <? } ?>
                </tr>

                <? $res = function_exists('curl_version'); ?>
                <? if ($res === true) { ?>
                    <? $version = curl_version(); ?>
                <? } ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>PHP Extension:</th>
                    <? if ($res === true) { ?>
                        <td><b>cURL</b> extension is enabled (v. <? echo $version['version']; ?>).</td>
                    <? } else { ?>
                        <td><b>cURL</b> extension is missing.</td>
                    <? } ?>
                </tr>

                <? $res = (is_numeric(ini_get('max_input_vars')) && (int) ini_get('max_input_vars') >= 2600); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>php.ini settings:</th>
                    <? if ($res === true) { ?>
                        <td><em>max_input_vars</em> is correct: <? echo ini_get('max_input_vars'); ?></td>
                    <? } else { ?>
                        <td><em>max_input_vars</em> is not correct: <b><? echo ini_get('max_input_vars'); ?></b>. Increase to at least: <b>2600</b>.</td>
                    <? } ?>
                </tr>

                <tr><th></th><td><strong>FILESYSTEM PERMISSIONS</strong></td></tr>

                <? $res = isChmod("$basepath/admin/scripts") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $basepath; ?>/admin/scripts</em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $basepath; ?>/admin/scripts</em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$basepath/admin/logs") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $basepath; ?>/admin/logs</em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $basepath; ?>/admin/logs</em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$basepath/csv_photos") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $basepath; ?>/csv_photos</em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $basepath; ?>/csv_photos</em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$basepath/ftp_photos") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $basepath; ?>/ftp_photos</em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $basepath; ?>/ftp_photos</em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$thumb_path") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $thumb_path; ?></em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $thumb_path; ?></em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$video_path") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $video_path; ?></em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $video_path; ?></em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$cache_path") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $cache_path; ?></em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $cache_path; ?></em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <? $res = isChmod("$temp_users_uploads") == '777'; ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>CHMOD</th>
                    <? if ($res === true) { ?>
                        <td><em><? echo $temp_users_uploads; ?></em> directory is writable.</td>
                    <? } else { ?>
                        <td><em><? echo $temp_users_uploads; ?></em> directory not writable! Please chmod it to 777.</td>
                    <? } ?>
                </tr>

                <tr><th></th><td><strong>OTHER INFORMATIONS</strong></td></tr>

                <? $res = ($admin_password != 'admin'); ?>
                <tr class="<? echo $res === true ? 'ok' : 'error'; ?>">
                    <th>Admin Account</th>
                    <? if ($res === true) { ?>
                        <td>Admin password is configured.</td>
                    <? } else { ?>
                        <td>Please set your admin password in <em>admin/config.php</em> (via ftp/ssh)</td>
                    <? } ?>
                </tr>

                <tr class="ok">
                    <th>Server Load Averages (<a href='http://en.wikipedia.org/wiki/Load_%28computing%29' target='_blank'>?</a>)</th>
                    <td><? echo $avgs[1] . ', ' . $avgs[2] . ', ' . $avgs[3] ?></td>
                </tr>

                <tr class="ok">
                    <th>Server Uptime</th>
                    <td><? echo $uptime ?></td>
                </tr>

                <tr class="ok">
                    <th>Running SQL Queries</th>
                    <td>
                        <? $results = dbQuery("SHOW FULL PROCESSLIST", false); ?>
                        <? if (is_array($results)) { ?>
                            <? foreach ($results as $result) { ?>
                                <? if ($row['Info']) { ?>
                                    <table>
                                        <tr>
                                            <td width="75"><? echo $row['Command']; ?></td>
                                            <td><? echo $row['Info']; ?></td>
                                        </tr>
                                    </table>
                                <? } ?>
                            <? } ?>
                        <? } ?>
                    </td>
                </tr>

            </tbody>
        </table>
        
    </div>
</div>

<? require "footer.php"; ?>