- Fix RedisCache driver to handle MGET failures gracefully with fallback - Add comprehensive discovery context comparison debug tools - Identify root cause: WEB context discovery missing 166 items vs CLI - WEB context missing RequestFactory class entirely (52 vs 69 commands) - Improved exception handling with detailed binding diagnostics
42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
// Test if the issue is specifically in web context
|
|
// by accessing localhost directly
|
|
echo "Testing localhost web request...\n";
|
|
|
|
$context = [
|
|
'http' => [
|
|
'method' => 'GET',
|
|
'header' => [
|
|
'User-Agent: Mozilla/5.0 (compatible test)',
|
|
'Host: localhost'
|
|
],
|
|
'ignore_errors' => true
|
|
],
|
|
'ssl' => [
|
|
'verify_peer' => false,
|
|
'verify_peer_name' => false
|
|
]
|
|
];
|
|
|
|
$response = @file_get_contents('https://localhost/', false, stream_context_create($context));
|
|
|
|
if ($response === false) {
|
|
$error = error_get_last();
|
|
echo "Failed to fetch localhost: " . $error['message'] . "\n";
|
|
|
|
// Try HTTP instead
|
|
echo "Trying HTTP instead of HTTPS...\n";
|
|
$response = @file_get_contents('http://localhost/', false, stream_context_create($context));
|
|
|
|
if ($response === false) {
|
|
echo "HTTP also failed\n";
|
|
} else {
|
|
echo "HTTP response length: " . strlen($response) . "\n";
|
|
echo "Response snippet: " . substr($response, 0, 200) . "\n";
|
|
}
|
|
} else {
|
|
echo "Response length: " . strlen($response) . "\n";
|
|
echo "Response snippet: " . substr($response, 0, 200) . "\n";
|
|
} |