debugging rsvp-submit.php

This commit is contained in:
spetznas committed 2026-06-17 19:06:56 +02:00
1 parent 1ff5581efd
commit 891ffce73e
10 files changed
+41 -67

No files matched your search

+2 -2
View File
@@ -137,14 +137,14 @@
<li class="navigation-item">
<a href="/ru/series/">🇷🇺</a>
<a href="/series/">🇬🇧</a>
</li>
<li class="navigation-item">
<a href="/series/">🇬🇧</a>
<a href="/ru/series/">🇷🇺</a>
</li>
+10 -10
View File
@@ -20,11 +20,6 @@
/>
</url><url>
<loc>http://markinstefan.xyz/de/categories/</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://markinstefan.xyz/de/categories/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
@@ -35,6 +30,11 @@
hreflang="ru"
href="http://markinstefan.xyz/ru/categories/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://markinstefan.xyz/de/categories/"
/>
</url><url>
<loc>http://markinstefan.xyz/de/hochzeit/</loc>
<xhtml:link
@@ -88,11 +88,6 @@
/>
</url><url>
<loc>http://markinstefan.xyz/de/series/</loc>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://markinstefan.xyz/ru/series/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
@@ -103,6 +98,11 @@
hreflang="en"
href="http://markinstefan.xyz/series/"
/>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://markinstefan.xyz/ru/series/"
/>
</url><url>
<loc>http://markinstefan.xyz/de/tags/</loc>
<xhtml:link
+5 -5
View File
@@ -139,6 +139,11 @@
/>
</url><url>
<loc>http://markinstefan.xyz/tags/</loc>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://markinstefan.xyz/ru/tags/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
@@ -149,10 +154,5 @@
hreflang="en"
href="http://markinstefan.xyz/tags/"
/>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://markinstefan.xyz/ru/tags/"
/>
</url>
</urlset>
+1 -14
View File
@@ -1,9 +1,7 @@
<?php
file_put_contents('/tmp/rsvp-debug.log', "1\n", FILE_APPEND);
require __DIR__ . '/vendor/autoload.php';
file_put_contents('/tmp/rsvp-debug.log', "2\n", FILE_APPEND);
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
@@ -12,7 +10,6 @@ use Dotenv\Dotenv;
$dotenv = Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->safeLoad();
file_put_contents('/tmp/rsvp-debug.log', "3\n", FILE_APPEND);
function checkboxArrayToString($value)
{
@@ -103,18 +100,14 @@ foreach ($fields as &$field) {
$field = mb_convert_encoding($field, 'UTF-8', 'auto');
}
file_put_contents('/tmp/rsvp-debug.log', "4\n", FILE_APPEND);
$mail = new PHPMailer(true);
try {
$mail->CharSet = 'UTF-8';
error_log("SMTP_HOST=" . $_ENV['SMTP_HOST']);
error_log("SMTP_PORT=" . $_ENV['SMTP_PORT']);
error_log("SMTP_USER=" . $_ENV['SMTP_USER']);
$mail->isSMTP();
$mail->Host = $_ENV['SMTP_HOST'];
$mail->Host = gethostbyname($_ENV['SMTP_HOST']);
$mail->SMTPAuth = true;
$mail->Username = $_ENV['SMTP_USER'];
$mail->Password = $_ENV['SMTP_PASS'];
@@ -203,14 +196,8 @@ EOD;
$mail->Body = $body;
file_put_contents('/tmp/rsvp-debug.log', "5\n", FILE_APPEND);
$mail->SMTPDebug = 2;
$mail->Debugoutput = 'error_log';
$mail->Timeout = 10;
error_log("About to send mail");
$mail->send();
error_log("Mail sent");
file_put_contents('/tmp/rsvp-debug.log', "6\n", FILE_APPEND);
header('Location: /thank-you/');
exit;
+2 -2
View File
@@ -136,14 +136,14 @@
<li class="navigation-item">
<a href="/404.html">🇬🇧</a>
<a href="/de/404.html">🇩🇪</a>
</li>
<li class="navigation-item">
<a href="/de/404.html">🇩🇪</a>
<a href="/404.html">🇬🇧</a>
</li>
+2 -2
View File
@@ -137,14 +137,14 @@
<li class="navigation-item">
<a href="/de/categories/">🇩🇪</a>
<a href="/categories/">🇬🇧</a>
</li>
<li class="navigation-item">
<a href="/categories/">🇬🇧</a>
<a href="/de/categories/">🇩🇪</a>
</li>
+2 -2
View File
@@ -138,14 +138,14 @@
<li class="navigation-item">
<a href="/de/">🇩🇪</a>
<a href="/">🇬🇧</a>
</li>
<li class="navigation-item">
<a href="/">🇬🇧</a>
<a href="/de/">🇩🇪</a>
</li>
+14 -14
View File
@@ -20,11 +20,6 @@
/>
</url><url>
<loc>http://markinstefan.xyz/ru/categories/</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://markinstefan.xyz/de/categories/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
@@ -35,6 +30,11 @@
hreflang="ru"
href="http://markinstefan.xyz/ru/categories/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://markinstefan.xyz/de/categories/"
/>
</url><url>
<loc>http://markinstefan.xyz/ru/series/</loc>
<xhtml:link
@@ -54,6 +54,11 @@
/>
</url><url>
<loc>http://markinstefan.xyz/ru/tags/</loc>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://markinstefan.xyz/ru/tags/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
@@ -64,11 +69,6 @@
hreflang="en"
href="http://markinstefan.xyz/tags/"
/>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://markinstefan.xyz/ru/tags/"
/>
</url><url>
<loc>http://markinstefan.xyz/ru/contact/</loc>
<xhtml:link
@@ -90,13 +90,13 @@
<loc>http://markinstefan.xyz/ru/</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://markinstefan.xyz/de/"
hreflang="en"
href="http://markinstefan.xyz/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://markinstefan.xyz/"
hreflang="de"
href="http://markinstefan.xyz/de/"
/>
<xhtml:link
rel="alternate"
+2 -2
View File
@@ -137,14 +137,14 @@
<li class="navigation-item">
<a href="/de/tags/">🇩🇪</a>
<a href="/ru/tags/">🇷🇺</a>
</li>
<li class="navigation-item">
<a href="/ru/tags/">🇷🇺</a>
<a href="/de/tags/">🇩🇪</a>
</li>
+1 -14
View File
@@ -1,9 +1,7 @@
<?php
file_put_contents('/tmp/rsvp-debug.log', "1\n", FILE_APPEND);
require __DIR__ . '/vendor/autoload.php';
file_put_contents('/tmp/rsvp-debug.log', "2\n", FILE_APPEND);
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
@@ -12,7 +10,6 @@ use Dotenv\Dotenv;
$dotenv = Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->safeLoad();
file_put_contents('/tmp/rsvp-debug.log', "3\n", FILE_APPEND);
function checkboxArrayToString($value)
{
@@ -103,18 +100,14 @@ foreach ($fields as &$field) {
$field = mb_convert_encoding($field, 'UTF-8', 'auto');
}
file_put_contents('/tmp/rsvp-debug.log', "4\n", FILE_APPEND);
$mail = new PHPMailer(true);
try {
$mail->CharSet = 'UTF-8';
error_log("SMTP_HOST=" . $_ENV['SMTP_HOST']);
error_log("SMTP_PORT=" . $_ENV['SMTP_PORT']);
error_log("SMTP_USER=" . $_ENV['SMTP_USER']);
$mail->isSMTP();
$mail->Host = $_ENV['SMTP_HOST'];
$mail->Host = gethostbyname($_ENV['SMTP_HOST']);
$mail->SMTPAuth = true;
$mail->Username = $_ENV['SMTP_USER'];
$mail->Password = $_ENV['SMTP_PASS'];
@@ -203,14 +196,8 @@ EOD;
$mail->Body = $body;
file_put_contents('/tmp/rsvp-debug.log', "5\n", FILE_APPEND);
$mail->SMTPDebug = 2;
$mail->Debugoutput = 'error_log';
$mail->Timeout = 10;
error_log("About to send mail");
$mail->send();
error_log("Mail sent");
file_put_contents('/tmp/rsvp-debug.log', "6\n", FILE_APPEND);
header('Location: /thank-you/');
exit;