new jekyll site up and running!
This commit is contained in:
parent
907f833a2b
commit
32ce7bd7c5
25 changed files with 856 additions and 97 deletions
172
_site/2023/03/01/nextcloud-php-errors.html
Normal file
172
_site/2023/03/01/nextcloud-php-errors.html
Normal file
|
@ -0,0 +1,172 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>andrew conlin</title>
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/css/default.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
code {
|
||||
color: gold;
|
||||
}
|
||||
|
||||
pre {
|
||||
color: gold
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: gold;
|
||||
color: black
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-start">
|
||||
|
||||
|
||||
|
||||
<h1 class="display-3" style="font-weight:700;position:sticky;top:0;backdrop-filter:blur(10px);z-index:1000;">
|
||||
|
||||
<span style="color:black;background-color:gold;">ac</span>
|
||||
|
||||
</h1>
|
||||
<div class="row row-cols-1 row-cols-md-2">
|
||||
<div class="col col-md-3">
|
||||
<div class="row row-cols-1 g-0">
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="/index.html" class="text-decoration-none"> about </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="/blog.html" class="text-decoration-none"> blog </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="http://andrewconlinphotography.co.uk" class="text-decoration-none"> photos </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col gy-2">
|
||||
<h4>
|
||||
<div>
|
||||
<span>
|
||||
|
||||
|
||||
<a href="https://twitter.com/andrwcnln" target="_blank"><i class="fab fa-twitter"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://instagram.com/conlinsta" target="_blank"><i class="fab fa-instagram"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/andrwcnln" target="_blank"><i class="fab fa-github"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://www.strava.com/athletes/57896512" target="_blank"><i class="fab fa-strava"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://open.spotify.com/user/1135508731?si=61zWbsqmT92LdT0JA5bAKw" target="_blank"><i class="fab fa-spotify"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://letterboxd.com/andrewconlin/" target="_blank"><img class="letterboxd" src="/assets/images/letterboxd.png"></a>
|
||||
|
||||
|
||||
|
||||
<a href="mailto:andrew@andrewconl.in" target="_blank"><i class="fas fa-envelope"></i></a>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
<hr class="menu">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-9">
|
||||
<h1 style="font-weight: 500;">
|
||||
Fixing php errors in a Nextcloud docker-compose configuration
|
||||
</h1>
|
||||
|
||||
|
||||
<p style="font-family:Rubik Mono One;">
|
||||
01 Mar 2023 |
|
||||
|
||||
|
||||
<span style="background-color:gold;color:black;">til</span>
|
||||
|
||||
</p>
|
||||
<hr>
|
||||
|
||||
<p>I was trying to rescan the files in my Nextcloud server (running on Raspberry Pi 4 with DietPi), and kept running into some weird <code class="language-plaintext highlighter-rouge">php</code> errors.</p>
|
||||
|
||||
<h3 id="first-error---could-not-find-driver">First error - “could not find driver”</h3>
|
||||
|
||||
<p>I was trying using the following syntax to call <code class="language-plaintext highlighter-rouge">occ</code> and scan the files:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo -u www-data php /path/to/nextcloud/occ files:scan --all
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>but I kept running into a PHP error. Specifically this error:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /path/to/nextcloud/lib/private/DB/Connection.php:139
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>followed by a long, verbose stack trace.</p>
|
||||
|
||||
<p>It took me a decent amount of time to diagnose the exact issue, but eventually I found <a href="https://docs.nextcloud.com/server/20/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation">this list</a> of required PHP modules in the Nextcloud admin manual.</p>
|
||||
|
||||
<p>Running <code class="language-plaintext highlighter-rouge">php -m</code> will print out the list of currently installed PHP modules. I noticed I was missing quite a few of the required modules, but the one that was causing my issue was the missing <code class="language-plaintext highlighter-rouge">pdo_mysql</code> module.
|
||||
This can be installed by running:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install php7.4-mysql
|
||||
</code></pre></div></div>
|
||||
<p><strong>Note: This command will change based on your OS, PHP version and database type</strong></p>
|
||||
|
||||
<p>This resolved the error! However (as is always the case), this only meant I got a shiny new error instead:</p>
|
||||
|
||||
<h3 id="second-error---name-or-service-not-known">Second error - “Name or service not known”</h3>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /path/to/nextcloud/lib/private/DB/Connection.php:139
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>From first glance, this looks like something wrong in the DNS name resolution. This sent me a long way down the wrong path, changing a whole bunch of things in my docker-compose.yml file.
|
||||
Eventually however, after a long and perilous journey over the high seas of Nextcloud forums and StackOverflow, I found <a href="https://techoverflow.net/2020/07/17/how-to-run-nextcloud-php-occ-in-a-docker-compose-configuration/">this example</a> of running <code class="language-plaintext highlighter-rouge">php occ</code> in a docker-compose configuration.
|
||||
This led me to running this command:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker-compose exec -u www-data nextcloud-app php occ files:scan --all
|
||||
</code></pre></div></div>
|
||||
<p><strong>Note: replace nextcloud-app with the name of your Nextcloud container. Also, this command must be run from the directory of your Nextcloud docker-compose.yml</strong></p>
|
||||
|
||||
<p>….aaaaaand, <em>voila!</em> The command runs, the files are scanned and everything is up to date.</p>
|
||||
|
||||
<p><img src="/assets/images/occ.png" alt="terminal output showing the files that have been successfully been scanned" /></p>
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
73
_site/assets/css/default.css
Normal file
73
_site/assets/css/default.css
Normal file
|
@ -0,0 +1,73 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=Rubik+Mono+One&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
height: 3px;
|
||||
background-color: #171717;
|
||||
opacity: 100%;
|
||||
}
|
||||
|
||||
hr.menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
hr.menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-family: "Rubik";
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre {
|
||||
color: white;
|
||||
background-color: #171717;
|
||||
padding: 10px 10px 10px 10px;
|
||||
border-radius: 10px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 30vw;
|
||||
}
|
||||
|
||||
img.letterboxd {
|
||||
display: inline-block;
|
||||
width:20px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
img {
|
||||
width: 90vw;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
img.letterboxd {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
BIN
_site/assets/images/letterboxd.png
Normal file
BIN
_site/assets/images/letterboxd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
_site/assets/images/me.jpg
Normal file
BIN
_site/assets/images/me.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 MiB |
BIN
_site/assets/images/occ.png
Normal file
BIN
_site/assets/images/occ.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
134
_site/blog.html
Normal file
134
_site/blog.html
Normal file
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>andrew conlin</title>
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/css/default.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
code {
|
||||
color: ;
|
||||
}
|
||||
|
||||
pre {
|
||||
color:
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: ;
|
||||
color:
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-start">
|
||||
|
||||
|
||||
|
||||
<h1 class="display-3" style="font-weight:700;position:sticky;top:0;backdrop-filter:blur(10px);z-index:1000;">
|
||||
|
||||
<span style="color:black;background-color:white;">ac</span>
|
||||
|
||||
</h1>
|
||||
<div class="row row-cols-1 row-cols-md-2">
|
||||
<div class="col col-md-3">
|
||||
<div class="row row-cols-1 g-0">
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="/index.html" class="text-decoration-none"> about </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="/blog.html" class="text-decoration-none"> blog </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="http://andrewconlinphotography.co.uk" class="text-decoration-none"> photos </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col gy-2">
|
||||
<h4>
|
||||
<div>
|
||||
<span>
|
||||
|
||||
|
||||
<a href="https://twitter.com/andrwcnln" target="_blank"><i class="fab fa-twitter"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://instagram.com/conlinsta" target="_blank"><i class="fab fa-instagram"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/andrwcnln" target="_blank"><i class="fab fa-github"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://www.strava.com/athletes/57896512" target="_blank"><i class="fab fa-strava"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://open.spotify.com/user/1135508731?si=61zWbsqmT92LdT0JA5bAKw" target="_blank"><i class="fab fa-spotify"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://letterboxd.com/andrewconlin/" target="_blank"><img class="letterboxd" src="/assets/images/letterboxd.png"></a>
|
||||
|
||||
|
||||
|
||||
<a href="mailto:andrew@andrewconl.in" target="_blank"><i class="fas fa-envelope"></i></a>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
<hr class="menu">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-9">
|
||||
<h1 style="font-weight: 500;">
|
||||
latest posts
|
||||
</h1>
|
||||
<hr>
|
||||
<ul style="list-style-type:none;margin:0;padding:0;">
|
||||
|
||||
|
||||
<li>
|
||||
<div style="font-family:Rubik Mono One;">
|
||||
01 Mar 2023 |
|
||||
|
||||
|
||||
<span style="background-color:gold;color:black;">til</span>
|
||||
|
||||
</div>
|
||||
<h4><a href="/2023/03/01/nextcloud-php-errors.html">Fixing php errors in a Nextcloud docker-compose configuration</a></h4>
|
||||
<p>I was trying to rescan the files in my Nextcloud server (running on Raspberry Pi 4 with DietPi), and kept running into some weird <code class="language-plaintext highlighter-rouge">php</code> errors.</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
131
_site/index.html
Normal file
131
_site/index.html
Normal file
|
@ -0,0 +1,131 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>andrew conlin</title>
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/css/default.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
code {
|
||||
color: ;
|
||||
}
|
||||
|
||||
pre {
|
||||
color:
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: ;
|
||||
color:
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-start">
|
||||
|
||||
|
||||
|
||||
<h1 class="display-3" style="font-weight:700;position:sticky;top:0;backdrop-filter:blur(10px);z-index:1000;">
|
||||
|
||||
<span style="color:black;background-color:white;">ac</span>
|
||||
|
||||
</h1>
|
||||
<div class="row row-cols-1 row-cols-md-2">
|
||||
<div class="col col-md-3">
|
||||
<div class="row row-cols-1 g-0">
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="/index.html" class="text-decoration-none"> about </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="/blog.html" class="text-decoration-none"> blog </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<h4>
|
||||
<a href="http://andrewconlinphotography.co.uk" class="text-decoration-none"> photos </a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col gy-2">
|
||||
<h4>
|
||||
<div>
|
||||
<span>
|
||||
|
||||
|
||||
<a href="https://twitter.com/andrwcnln" target="_blank"><i class="fab fa-twitter"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://instagram.com/conlinsta" target="_blank"><i class="fab fa-instagram"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/andrwcnln" target="_blank"><i class="fab fa-github"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://www.strava.com/athletes/57896512" target="_blank"><i class="fab fa-strava"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://open.spotify.com/user/1135508731?si=61zWbsqmT92LdT0JA5bAKw" target="_blank"><i class="fab fa-spotify"></i></a>
|
||||
|
||||
|
||||
|
||||
<a href="https://letterboxd.com/andrewconlin/" target="_blank"><img class="letterboxd" src="/assets/images/letterboxd.png"></a>
|
||||
|
||||
|
||||
|
||||
<a href="mailto:andrew@andrewconl.in" target="_blank"><i class="fas fa-envelope"></i></a>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
<hr class="menu">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-9">
|
||||
<h1 style="font-weight: 500;">
|
||||
about me
|
||||
</h1>
|
||||
<hr>
|
||||
<img src="/assets/images/me.jpg">
|
||||
<br>
|
||||
Hi! My name is Andrew Conlin. I am a <a href="https://linkedin.com" target="_blank">software engineer</a> and <a href="http://andrewconlinphotography.co.uk" target="_blank">photographer</a>, currently based in Cambridge, England.
|
||||
<br>
|
||||
<br>
|
||||
My main hobbies are film photography and running. I love <a href="https://letterboxd.com/andrewconlin/">watching movies</a>, especially in the cinema. I love post-punk, dreampop and experimental hip hop. I love drinking good coffee, good beer and good whisky. I am also a passionate self-hoster, and like to think that I'm at least somewhat privacy conscious.
|
||||
<br>
|
||||
<br>
|
||||
I mainly use this site as a space for my blog, where I post interesting things I've found, and some of my (not so interesting) thoughts. Inspired by <a href="https://til.simonwillison.net/">Simon Willison</a>, I also post my TIL series here. Any time I run into a weird error while programming, I post the full error message and the fix that I found, to hopefully help someone down the line.
|
||||
<br>
|
||||
<br>
|
||||
<h1> contact </h1>
|
||||
<hr>
|
||||
You can <a href="mailto:andrew@andrewconl.in">email me</a>, or use any of the socials in the nav menu.
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue