HEX
Server: nginx/1.22.1
System: Linux iZuf67d4hh2ssx30nkok6dZ 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //www/server/phpmyadmin/phpmyadmin_09ebd1f1eecc8873/version_check.php
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * A caching proxy for retrieving version information from phpmyadmin.net
 *
 * @package PhpMyAdmin
 */

$_GET['ajax_request'] = 'true';

// Sets up the session
require_once 'libraries/common.inc.php';
require_once 'libraries/Util.class.php';

// Get response text from phpmyadmin.net or from the session
// Update cache every 6 hours
if (isset($_SESSION['cache']['version_check'])
    && time() < $_SESSION['cache']['version_check']['timestamp'] + 3600 * 6
) {
    $save = false;
    $response = $_SESSION['cache']['version_check']['response'];
} else {
    $save = true;
    $file = 'https://www.phpmyadmin.net/home_page/version.json';
    if (function_exists('curl_init')) {
        $curl_handle = curl_init($file);
        curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
        $response = curl_exec($curl_handle);
    } else if (ini_get('allow_url_fopen')) {
        $response = file_get_contents($file);
    }
}

require_once 'libraries/common.inc.php';

// Disabling standard response.
PMA_Response::getInstance()->disable();

// Always send the correct headers
header('Content-type: application/json; charset=UTF-8');

// Save and forward the response only if in valid format
$data = json_decode($response);
if (is_object($data)) {
    $latestCompatible = PMA_Util::getLatestCompatibleVersion(
        $data->releases
    );

    $version = '';
    $date = '';
    if ($latestCompatible != null) {
        $version = $latestCompatible['version'];
        $date = $latestCompatible['date'];
    }

    if ($save) {
        $_SESSION['cache']['version_check'] = array(
            'response' => $response,
            'timestamp' => time()
        );
    }
    echo json_encode(
        array(
            'version' => (! empty($version) ? $version : ''),
            'date' => (! empty($date) ? $date : ''),
        )
    );
}

?>