20 lines
748 B
PHP
20 lines
748 B
PHP
<?php
|
|
require_once __DIR__ . '/app/bootstrap/init.php';
|
|
|
|
echo "ROOT_PATH: " . ROOT_PATH . PHP_EOL;
|
|
echo "STORAGE_PATH: " . STORAGE_PATH . PHP_EOL;
|
|
echo "Is STORAGE_PATH dir? " . (is_dir(STORAGE_PATH) ? 'YES' : 'NO') . PHP_EOL;
|
|
echo "Is STORAGE_PATH writable? " . (is_writable(STORAGE_PATH) ? 'YES' : 'NO') . PHP_EOL;
|
|
echo "Current User: " . get_current_user() . PHP_EOL;
|
|
echo "PHP User: " . exec('whoami') . PHP_EOL;
|
|
|
|
$testDir = STORAGE_PATH . '/test_mkdir_' . time();
|
|
if (mkdir($testDir, 0777, true)) {
|
|
echo "Successfully created test dir: $testDir" . PHP_EOL;
|
|
rmdir($testDir);
|
|
} else {
|
|
echo "FAILED to create test dir: $testDir" . PHP_EOL;
|
|
$err = error_get_last();
|
|
echo "Error: " . ($err['message'] ?? 'Unknown') . PHP_EOL;
|
|
}
|