@Pawlicker I did not say there were "directories are jank on BSD" and I was able to get it running on OpenBSD just fine, except some problems with running GNU Social on PHP 8.1
@gnusocialjp The problem is that GNU social has a sort of custom database abstraction built atop the PEAR package "MDB2" that hasn't been updated for over a decade now, which was primarily targeting PHP 4 and 5 support at the time. The problem is there may be some breaking changes in PHP 7 or 8, while that package (MDB2) is unmaintained. There's also some temporary architectural workarounds in GNU social that were put there, and never refactored for over a decade and counting (e.g. instantiate an instance of User, and use the getDatabaseConnection() method, just to grab the current instance of the database connection; in lib/database/schema.php). Nonetheless, if you try installing GNU social on PHP 8+, the installer breaks upon registering the first user and is left in an inconsistent state, requiring the database and config to be wiped before retrying the install.
I'd be willing to assist with any improvements to GNU social as well, I just don't know where the active project is. The repo referenced on the gnusocial.network website seems fairly inactive, and the last most active contributor hasn't made their own contributions in over a year, and their fedi instance is "currently offline". I don't know if there's a third-party effort elsewhere that has more activity.
@Pawlicker I did not say there were "directories are jank on BSD" and I was able to get it running on OpenBSD just fine, except some problems with running GNU Social on PHP 8.1
@gnusocialjp The problem is that GNU social has a sort of custom database abstraction built atop the PEAR package "MDB2" that hasn't been updated for over a decade now, which was primarily targeting PHP 4 and 5 support at the time. The problem is there may be some breaking changes in PHP 7 or 8, while that package (MDB2) is unmaintained. There's also some temporary architectural workarounds in GNU social that were put there, and never refactored for over a decade and counting (e.g. instantiate an instance of User, and use the getDatabaseConnection() method, just to grab the current instance of the database connection; in lib/database/schema.php). Nonetheless, if you try installing GNU social on PHP 8+, the installer breaks upon registering the first user and is left in an inconsistent state, requiring the database and config to be wiped before retrying the install.
I'd be willing to assist with any improvements to GNU social as well, I just don't know where the active project is. The repo referenced on the gnusocial.network website seems fairly inactive, and the last most active contributor hasn't made their own contributions in over a year, and their fedi instance is "currently offline". I don't know if there's a third-party effort elsewhere that has more activity.
@TechnicalSuwako ありがとう。<https://social.076.moe/notice/824838> があなたの元投稿ですね。
以前議論のあった参考情報を掲載します。GNU socialのDB関係のライブラリーのPEAR::MDB2が古くて、対応しきれていないのがPHP v8で特に問題になるようです。PostgreSQLなら回避できたりしませんかね?あるいは、PEAR::MDB2をやめて、標準ライブラリーを使うなど。
「[mysqli_num_rows() doesn't like bool - NotABug.org: Free code hosting](https://notabug.org/diogo/gnu-social/issues/248)」が過去の類似issueです。
PHP v8の動作確認用のDockerfileも追加しても良いかもしれません。
この課題は重要なので、5-10万円くらいの報酬を考えています。
<blockquote xmlns="http://www.w3.org/1999/xhtml" style="background:rgb(99,100,255);background-image:linear-gradient(hsla(0,0%,100%,0.5),hsla(0,0%,100%,0.5))"><article><header style="display:flex;line-height:1.5"><img xmlns="http://www.w3.org/1999/xhtml" referrerpolicy="no-referrer" alt="avatar" src="" style="height:4.5em" /><div><div><a href="https://were.social/notice/AOXdA6WlNTl8360360">2022-10-14T00:37:29.000Z</a></div><div>arcanicanis|<a href="https://were.social/users/arcanicanis">arcanicanis@were.social</a></div><div><a href="https://bae.st/objects/ec5b2308-5b45-4f57-9189-9d871a01f0e7">replying to</a>
Purple Cat with a PC-98 |<a href="https://bae.st/users/Pawlicker">Pawlicker@bae.st</a></div></div></header><main><span class="h-card"><a class="u-url mention" data-user="AJaQt7EdSWnJ49tPrk" href="https://bae.st/users/Pawlicker" rel="ugc">@<span>Pawlicker</span></a></span> <br />I did not say there were "directories are jank on BSD" and I was able to get it running on OpenBSD just fine, except some problems with running GNU Social on PHP 8.1<br /><br /><span class="h-card"><a class="u-url mention" data-user="AMUHSJYACr7WwcL1Oq" href="https://gnusocial.jp/gnusocialjp" rel="ugc">@<span>gnusocialjp</span></a></span> <br />The problem is that GNU social has a sort of custom database abstraction built atop the PEAR package "MDB2" that hasn't been updated for over a decade now, which was primarily targeting PHP 4 and 5 support at the time. The problem is there may be some breaking changes in PHP 7 or 8, while that package (MDB2) is unmaintained. There's also some temporary architectural workarounds in GNU social that were put there, and never refactored for over a decade and counting (e.g. instantiate an instance of User, and use the getDatabaseConnection() method, just to grab the current instance of the database connection; in lib/database/schema.php). Nonetheless, if you try installing GNU social on PHP 8+, the installer breaks upon registering the first user and is left in an inconsistent state, requiring the database and config to be wiped before retrying the install.<br /><br />I'd be willing to assist with any improvements to GNU social as well, I just don't know where the active project is. The repo referenced on the <a href="http://gnusocial.network" rel="ugc">gnusocial.network</a> website seems fairly inactive, and the last most active contributor hasn't made their own contributions in over a year, and their fedi instance is "currently offline". I don't know if there's a third-party effort elsewhere that has more activity.</main></article></blockquote>
<blockquote xmlns="http://www.w3.org/1999/xhtml" style="background:rgb(99,100,255);background-image:linear-gradient(hsla(0,0%,100%,0.5),hsla(0,0%,100%,0.5))"><article><header style="display:flex;line-height:1.5"><img xmlns="http://www.w3.org/1999/xhtml" referrerpolicy="no-referrer" alt="avatar" src="" style="height:4.5em" /><div><div><a href="https://were.social/notice/AOXdA6WlNTl8360360">2022-10-14T00:37:29.000Z</a></div><div>arcanicanis|<a href="https://were.social/users/arcanicanis">arcanicanis@were.social</a></div><div><a href="https://bae.st/objects/ec5b2308-5b45-4f57-9189-9d871a01f0e7">replying to</a>
Purple Cat with a PC-98 |<a href="https://bae.st/users/Pawlicker">Pawlicker@bae.st</a></div></div></header><main><span class="h-card"><a class="u-url mention" data-user="AJaQt7EdSWnJ49tPrk" href="https://bae.st/users/Pawlicker" rel="ugc">@<span>Pawlicker</span></a></span> <br />I did not say there were "directories are jank on BSD" and I was able to get it running on OpenBSD just fine, except some problems with running GNU Social on PHP 8.1<br /><br /><span class="h-card"><a class="u-url mention" data-user="AMUHSJYACr7WwcL1Oq" href="https://gnusocial.jp/gnusocialjp" rel="ugc">@<span>gnusocialjp</span></a></span> <br />The problem is that GNU social has a sort of custom database abstraction built atop the PEAR package "MDB2" that hasn't been updated for over a decade now, which was primarily targeting PHP 4 and 5 support at the time. The problem is there may be some breaking changes in PHP 7 or 8, while that package (MDB2) is unmaintained. There's also some temporary architectural workarounds in GNU social that were put there, and never refactored for over a decade and counting (e.g. instantiate an instance of User, and use the getDatabaseConnection() method, just to grab the current instance of the database connection; in lib/database/schema.php). Nonetheless, if you try installing GNU social on PHP 8+, the installer breaks upon registering the first user and is left in an inconsistent state, requiring the database and config to be wiped before retrying the install.<br /><br />I'd be willing to assist with any improvements to GNU social as well, I just don't know where the active project is. The repo referenced on the <a href="http://gnusocial.network" rel="ugc">gnusocial.network</a> website seems fairly inactive, and the last most active contributor hasn't made their own contributions in over a year, and their fedi instance is "currently offline". I don't know if there's a third-party effort elsewhere that has more activity.</main></article></blockquote>
今直ぐやっています。
https://notabug.org/TechnicalSuwako/gnusocial
テスター・デバッガーは大募集です。
テストする方法
エラーを見るには、php.iniで:
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
PHP 8.2をインストールすると、下記のコマンドでサーバーを開始出来ます:
cd public
php -S 0.0.0.0:8000
ブラウザで:
http://127.0.0.1:8000
@TechnicalSuwako ありがとう。https://social.076.moe/notice/824838 があなたの元投稿ですね。
以前議論のあった参考情報を掲載します。GNU socialのDB関係のライブラリーのPEAR::MDB2が古くて、対応しきれていないのがPHP v8で特に問題になるようです。PostgreSQLなら回避できたりしませんかね?あるいは、PEAR::MDB2をやめて、標準ライブラリーを使うなど。
「mysqli_num_rows() doesn't like bool - NotABug.org: Free code hosting」が過去の類似issueです。
PHP v8の動作確認用のDockerfileも追加しても良いかもしれません。
この課題は重要なので、5-10万円くらいの報酬を考えています。
既に修正しました:
https://notabug.org/TechnicalSuwako/gnusocial/src/main/extlib/MDB2/Driver/mysqli.php#L1649
Dockerを使った事がありませんので、修正出来ると思いますが、テスト出来ません。
私が使っているパッケージ(Artix Linux):
@TechnicalSuwako #14 でpull requestありがとうございました。明日か週末に確認しますのでお待ちください。