<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>selfoss support forum - stopped working with php82-8.2.18</title>
<link>https://forum.selfoss.aditu.de/</link>
<description>selfoss support forum</description>
<language>en</language>
<item>
<title>stopped working with php82-8.2.18 (reply)</title>
<content:encoded><![CDATA[<p>Hi, sorry about that.</p>
<p>If it started happening suddenly, that sounds like the database got corrupted or gotten to inconsistent state somehow. But selfoss <a href="https://github.com/fossar/selfoss/blob/65a58ff4cfba9550479d9ee74bc26df2c2f450ea/src/daos/mysql/Database.php#L243">only really modifies triggers when it is updated to a new version</a>, and it stores the info that it performed a migration step in the database itself, so I am baffled how it could happen.</p>
<blockquote><pre><code>[2024-05-18T19:33:42.850580+00:00] selfoss.ERROR: SQLSTATE[HY000]: General error: 1360 Trigger does not exist {&quot;exception&quot;:&quot;[object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1360 Trigger does not exist at /usr/local/www/nginx/mywebsite.com/src/helpers/DatabaseConnection.php:140)</code></pre></blockquote><p>Actually, you are not the first person experiencing this. It was reported on <a href="https://github.com/fossar/selfoss/issues/1399">GitHub</a>.</p>
<p>You should be able to work around it by replacing <code>DROP TRIGGER</code> with <code>DROP TRIGGER IF EXISTS</code> on the the following lines:</p>
<p><a href="https://github.com/fossar/selfoss/blob/d45cba4a8013e0c50cdd583da9ca8e0aa5516d75/src/daos/mysql/Database.php#L241-L242">https://github.com/fossar/selfoss/blob/d45cba4a8013e0c50cdd583da9ca8e0aa5516d75/src/daos/mysql/Database.php#L241-L242</a></p>
<p>Also, are you sure SQLite complains about the trigger not existing? We are not even touching the existing trigger in SQLite – instead we <a href="https://github.com/fossar/selfoss/blob/65a58ff4cfba9550479d9ee74bc26df2c2f450ea/src/daos/sqlite/Database.php#L239-L240">create a new table from scratch</a>.</p>
<blockquote><p>I was using sqlite so I switched to mysql to test things and got the same error, yet when I check mysql from the shell the database connection did in fact work and tables got created in a fresh new database, despite seeing the above error.</p>
</blockquote><p>If you are willing to debug this, I would appreciate the following info:</p>
<ul>
<li>Can you check what the <code>version</code> table contains. That will tell us how far along it got in the database schema migration step.<br />
</li><li>Could you also share the lines in the log below <code>[stacktrace]</code> of the original error?<br />
</li><li>What version of MySQL server are you running?<br />
</li><li>Adding <code>debug=1</code> and <code>logger_level=DEBUG</code> to your config in latest selfoss and trying with a clean database might be also helpful.</li></ul>]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=1503</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=1503</guid>
<pubDate>Mon, 20 May 2024 00:42:24 +0000</pubDate>
<dc:creator>jtojnar</dc:creator>
</item>
<item>
<title>stopped working with php82-8.2.18</title>
<content:encoded><![CDATA[<p>I've been using Selfoss for many years now and love it. Unfortunately it suddenly stopped working. The only change on my side has been an upgrade from an early version of php 8.2.x to php 8.2.18. I'm getting database connection errors with both sqlite and mysql that look like this in the log:</p>
<pre><code>[2024-05-18T19:33:42.850580+00:00] selfoss.ERROR: SQLSTATE[HY000]: General error: 1360 Trigger does not exist {&quot;exception&quot;:&quot;[object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1360 Trigger does not exist at /usr/local/www/nginx/mywebsite.com/src/helpers/DatabaseConnection.php:140)
</code></pre><p>I was using sqlite so I switched to mysql to test things and got the same error, yet when I check mysql from the shell the database connection did in fact work and tables got created in a fresh new database, despite seeing the above error.</p>
<p>My main setup is Nginx with PHP-FPM but I've also tested it with Apache24 and mod_php and got the same error, both are running php 8.2.18 now. I also tested both sqlite and mysql on the two different systems with the same result. I read through the PHP changelog and didn't find much of interest with any sqlite updates, just a few changes to PDO since 8.2.0 came out.</p>
<p>My Nginx system runs about two dozen websites, most use mysql with php-fpm and they all work fine. I can connect through sockets or over IP.</p>
<p>I've tried the latest Selfoss builds on Github as well as older Github builds from late 2023. Thought I'd ask here before abandoning the software and trying something else. </p>
<p>Maybe I'm just losing my mind. Happy to switch to another version of PHP to get it working again.</p>
]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=1502</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=1502</guid>
<pubDate>Sat, 18 May 2024 20:05:30 +0000</pubDate>
<dc:creator>snak-pak</dc:creator>
</item>
</channel>
</rss>
