Umbau auf server

This commit is contained in:
2026-07-13 20:00:07 +02:00
parent 97357a88e0
commit 3193397dc7
1036 changed files with 365042 additions and 3 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
header('Content-Type: text/plain; charset=utf-8');
$candidates = PHP_OS_FAMILY === 'Windows'
? ['python', 'py']
: ['/usr/bin/python3', '/usr/bin/python', 'python3', 'python'];
$probe = <<<'PY'
import platform
import sys
print(sys.version)
print(sys.executable)
print("machine=" + platform.machine())
print("system=" + platform.system())
print("platform=" + platform.platform())
PY;
foreach ($candidates as $pythonBinary) {
$command = $pythonBinary . ' -c ' . escapeshellarg($probe);
$output = [];
$resultCode = 0;
exec($command . ' 2>&1', $output, $resultCode);
echo "Kandidat: " . $pythonBinary . PHP_EOL;
echo "Exit-Code: " . $resultCode . PHP_EOL;
echo implode(PHP_EOL, $output) . PHP_EOL;
echo str_repeat('-', 60) . PHP_EOL;
}