From ead3bcadeb363e29677c3feb480647a291b06188 Mon Sep 17 00:00:00 2001
From: 180088 <180088@stud.prz.edu.pl>
Date: Tue, 25 Nov 2025 14:29:11 +0100
Subject: [PATCH] Remove Dockerfile and server startup script; update home.php
error handling
---
Dockerfile | 29 -----------------------------
start-server-and-tunnel-cmd.bat | 10 ----------
templates/Pages/home.php | 7 +------
3 files changed, 1 insertion(+), 45 deletions(-)
delete mode 100644 Dockerfile
delete mode 100644 start-server-and-tunnel-cmd.bat
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index af9de2a..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Minimalny Dockerfile dla aplikacji CakePHP
-FROM php:8.2-apache
-
-# Instalacja rozszerzeń PHP wymaganych przez CakePHP
-RUN docker-php-ext-install pdo pdo_mysql mbstring intl
-
-# Skopiuj pliki aplikacji do katalogu serwera
-COPY . /var/www/html/
-
-# Ustaw katalog roboczy
-WORKDIR /var/www/html
-
-# Ustaw uprawnienia
-RUN chown -R www-data:www-data /var/www/html
-
-# Włącz mod_rewrite dla CakePHP
-RUN a2enmod rewrite
-
-# Skonfiguruj Apache dla CakePHP
-RUN echo '
- AllowOverride All
-' > /etc/apache2/conf-available/cakephp.conf \
- && a2enconf cakephp
-
-# Domyślny port
-EXPOSE 80
-
-# Uruchom Apache
-CMD ["apache2-foreground"]
diff --git a/start-server-and-tunnel-cmd.bat b/start-server-and-tunnel-cmd.bat
deleted file mode 100644
index cf09184..0000000
--- a/start-server-and-tunnel-cmd.bat
+++ /dev/null
@@ -1,10 +0,0 @@
-
-@echo off
-REM Uruchom serwer CakePHP z Dockera na porcie 8765
-docker run -d --name wmt_cake_server -p 8765:80 wmt_cake
-
-REM Uruchom tunel Cloudflare w tym samym oknie
-cloudflared tunnel run 28d34607-3035-4448-8cf8-17821539f59c
-
-pause
-
diff --git a/templates/Pages/home.php b/templates/Pages/home.php
index 0ba7df3..808df7f 100644
--- a/templates/Pages/home.php
+++ b/templates/Pages/home.php
@@ -31,12 +31,7 @@ $checkConnection = function (string $name) {
$connected = true;
} catch (Exception $connectionError) {
$error = $connectionError->getMessage();
- if (method_exists($connectionError, 'getAttributes')) {
- $attributes = $connectionError->getAttributes();
- if (isset($attributes['message'])) {
- $error .= '
' . $attributes['message'];
- }
- }
+ // Only call getAttributes if the method exists and is callable
if ($name === 'debug_kit') {
$error = 'Try adding your current top level domain to the
DebugKit.safeTld