Server Environment Check"; echo "

PHP Version

"; echo "

Version: " . phpversion() . "

"; echo "

Required: 7.4+

"; echo "

Status: " . (version_compare(phpversion(), '7.4.0', '>=') ? '✅ OK' : '❌ TOO OLD') . "

"; echo "

PHP Extensions

"; $requiredExtensions = ['curl', 'json', 'mbstring', 'openssl', 'zip']; foreach ($requiredExtensions as $ext) { $loaded = extension_loaded($ext); echo "

{$ext}: " . ($loaded ? '✅ Loaded' : '❌ Missing') . "

"; } echo "

File Permissions

"; $dirs = [ 'logs' => __DIR__ . '/logs', 'vendor' => __DIR__ . '/vendor' ]; foreach ($dirs as $name => $path) { $exists = file_exists($path); $writable = is_writable($path); echo "

{$name}/: "; echo $exists ? '✅ Exists' : '❌ Missing'; echo " | "; echo $writable ? '✅ Writable' : '❌ Not Writable'; echo "

"; } echo "

Composer Dependencies

"; if (file_exists(__DIR__ . '/vendor/autoload.php')) { echo "

✅ vendor/autoload.php exists

"; require_once __DIR__ . '/vendor/autoload.php'; $classes = [ 'League\Csv\Reader' => 'league/csv', 'League\Csv\Writer' => 'league/csv', 'Carbon\Carbon' => 'nesbot/carbon', 'Firebase\JWT\JWT' => 'firebase/php-jwt' ]; foreach ($classes as $class => $package) { $exists = class_exists($class); echo "

{$package} ({$class}): " . ($exists ? '✅ Available' : '❌ Missing') . "

"; } } else { echo "

❌ vendor/autoload.php NOT FOUND

"; echo "

Run: composer install

"; } echo "

Configuration Files

"; $files = [ 'config.php', '43984435_77m2ujl3_config.json', 'CSVTransformer.php', 'OMGService.php', 'EmailService.php', 'EmailTemplates.php', 'ApplicationLogger.php' ]; foreach ($files as $file) { $exists = file_exists(__DIR__ . '/' . $file); echo "

{$file}: " . ($exists ? '✅ Exists' : '❌ Missing') . "

"; } echo "

PHP Configuration

"; echo "

display_errors: " . ini_get('display_errors') . "

"; echo "

error_reporting: " . error_reporting() . "

"; echo "

max_upload: " . ini_get('upload_max_filesize') . "

"; echo "

max_post: " . ini_get('post_max_size') . "

"; echo "

memory_limit: " . ini_get('memory_limit') . "

"; echo "

Test Service Loading

"; try { require_once __DIR__ . '/CSVTransformer.php'; $transformer = new CSVTransformer(); echo "

✅ CSVTransformer: OK

"; } catch (Exception $e) { echo "

❌ CSVTransformer: " . $e->getMessage() . "

"; } try { require_once __DIR__ . '/OMGService.php'; $omg = new OMGService(); echo "

✅ OMGService: OK

"; } catch (Exception $e) { echo "

❌ OMGService: " . $e->getMessage() . "

"; } try { require_once __DIR__ . '/EmailService.php'; $email = new EmailService(); echo "

✅ EmailService: OK

"; } catch (Exception $e) { echo "

❌ EmailService: " . $e->getMessage() . "

"; } echo "

Summary

"; echo "

If all checks pass above, the application should work.

"; echo "

If you see errors, fix them and run this check again.

";