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