T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/gocodeme.com/public_html/BACKUP/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/gocodeme.com/public_html/BACKUP/diagnostic.php
<?php
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html>
<head>
    <title>MusicStudio Pro - Server Diagnostic</title>
    <style>
        body { font-family: Arial, sans-serif; margin: 20px; }
        .success { color: green; }
        .error { color: red; }
        .warning { color: orange; }
        .info { color: blue; }
        pre { background: #f5f5f5; padding: 10px; border-radius: 5px; }
    </style>
</head>
<body>
    <h1>๐Ÿ”ง MusicStudio Pro - Server Diagnostic</h1>
    
    <h2>๐Ÿ“‹ Server Environment</h2>
    <ul>
        <li><strong>PHP Version:</strong> <span class="<?php echo version_compare(PHP_VERSION, '7.4.0', '>=') ? 'success' : 'error'; ?>"><?php echo PHP_VERSION; ?></span></li>
        <li><strong>Server Software:</strong> <span class="info"><?php echo $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown'; ?></span></li>
        <li><strong>Document Root:</strong> <span class="info"><?php echo $_SERVER['DOCUMENT_ROOT'] ?? 'Unknown'; ?></span></li>
    </ul>

    <h2>๐Ÿ”Œ Required Extensions</h2>
    <ul>
        <li><strong>cURL:</strong> 
            <span class="<?php echo function_exists('curl_init') ? 'success' : 'error'; ?>">
                <?php echo function_exists('curl_init') ? 'โœ… Available' : 'โŒ Not Available'; ?>
            </span>
        </li>
        <li><strong>JSON:</strong> 
            <span class="<?php echo function_exists('json_encode') ? 'success' : 'error'; ?>">
                <?php echo function_exists('json_encode') ? 'โœ… Available' : 'โŒ Not Available'; ?>
            </span>
        </li>
        <li><strong>OpenSSL:</strong> 
            <span class="<?php echo extension_loaded('openssl') ? 'success' : 'error'; ?>">
                <?php echo extension_loaded('openssl') ? 'โœ… Available' : 'โŒ Not Available'; ?>
            </span>
        </li>
    </ul>

    <h2>๐Ÿ“ File Permissions</h2>
    <ul>
        <li><strong>api.php:</strong> 
            <span class="<?php echo is_readable('api.php') ? 'success' : 'error'; ?>">
                <?php echo is_readable('api.php') ? 'โœ… Readable' : 'โŒ Not Readable'; ?>
            </span>
        </li>
        <li><strong>api.php (executable):</strong> 
            <span class="<?php echo is_executable('api.php') ? 'success' : 'warning'; ?>">
                <?php echo is_executable('api.php') ? 'โœ… Executable' : 'โš ๏ธ Not Executable'; ?>
            </span>
        </li>
    </ul>

    <h2>๐ŸŒ Network Test</h2>
    <?php
    if (function_exists('curl_init')) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, 'https://api.box');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
        
        $response = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        $error = curl_error($ch);
        curl_close($ch);
        
        if ($error) {
            echo '<p class="error">โŒ Network Error: ' . htmlspecialchars($error) . '</p>';
        } else {
            echo '<p class="success">โœ… API reachable (HTTP ' . $httpCode . ')</p>';
        }
    } else {
        echo '<p class="error">โŒ Cannot test network - cURL not available</p>';
    }
    ?>

    <h2>๐Ÿงช API Test</h2>
    <form method="post" action="">
        <input type="hidden" name="test_api" value="1">
        <button type="submit">Test API Endpoint</button>
    </form>

    <?php
    if (isset($_POST['test_api'])) {
        echo '<h3>API Test Results:</h3>';
        
        $testData = [
            'action' => 'music',
            'prompt' => 'Test melody',
            'model' => 'v3',
            'duration' => 10
        ];
        
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/api.php');
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($testData));
        curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        
        $response = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        $error = curl_error($ch);
        curl_close($ch);
        
        echo '<p><strong>HTTP Code:</strong> ' . $httpCode . '</p>';
        
        if ($error) {
            echo '<p class="error">โŒ cURL Error: ' . htmlspecialchars($error) . '</p>';
        } else {
            echo '<p><strong>Response:</strong></p>';
            echo '<pre>' . htmlspecialchars($response) . '</pre>';
            
            $result = json_decode($response, true);
            if ($result) {
                if (isset($result['success']) && $result['success']) {
                    echo '<p class="success">โœ… API is working correctly!</p>';
                } else {
                    echo '<p class="error">โŒ API Error: ' . ($result['error'] ?? 'Unknown error') . '</p>';
                }
            } else {
                echo '<p class="error">โŒ Invalid JSON response</p>';
            }
        }
    }
    ?>

    <h2>๐Ÿ“ Error Log Check</h2>
    <?php
    $errorLog = ini_get('error_log');
    if ($errorLog && file_exists($errorLog)) {
        $recentErrors = shell_exec('tail -n 20 ' . escapeshellarg($errorLog) . ' 2>/dev/null');
        if ($recentErrors) {
            echo '<h3>Recent Error Log Entries:</h3>';
            echo '<pre>' . htmlspecialchars($recentErrors) . '</pre>';
        } else {
            echo '<p class="success">โœ… No recent errors in log</p>';
        }
    } else {
        echo '<p class="warning">โš ๏ธ Error log not accessible or not configured</p>';
    }
    ?>

    <h2>๐Ÿ”ง Quick Fixes</h2>
    <ul>
        <li><strong>If cURL is missing:</strong> Contact your hosting provider to enable cURL extension</li>
        <li><strong>If file permissions are wrong:</strong> Set api.php to 644 or 755</li>
        <li><strong>If SSL issues:</strong> Check if your server supports HTTPS connections</li>
        <li><strong>If timeout issues:</strong> Increase max_execution_time in php.ini</li>
    </ul>

    <hr>
    <p><a href="musicstudio.html">โ† Back to MusicStudio Pro</a></p>
</body>
</html> 

CasperSecurity Mini