#13 PHP 8.2にバージョンアップ

Açık
TechnicalSuwako tarafından 1 yıl önce kere açıldı · 3 yorum
TechnicalSuwako 1 yıl önce olarak yorumlandı

今直ぐやっています。
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

今直ぐやっています。<br /> https://notabug.org/TechnicalSuwako/gnusocial テスター・デバッガーは大募集です。 # テストする方法 エラーを見るには、php.iniで:<br /> error_reporting = E_ALL<br /> display_errors = On<br /> display_startup_errors = On<br /> log_errors = On PHP 8.2をインストールすると、下記のコマンドでサーバーを開始出来ます:<br /> cd public<br /> php -S 0.0.0.0:8000 ブラウザで:<br /> http://127.0.0.1:8000
senooken 1 yıl önce olarak yorumlandı
Sahibi

@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万円くらいの報酬を考えています。

avatar@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.
avatar@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>
TechnicalSuwako 1 yıl önce olarak yorumlandı
Poster

以前議論のあった参考情報を掲載します。GNU socialのDB関係のライブラリーのPEAR::MDB2が古くて、対応しきれていないのがPHP v8で特に問題になるようです。PostgreSQLなら回避できたりしませんかね?あるいは、PEAR::MDB2をやめて、標準ライブラリーを使うなど。

「mysqli_num_rows() doesn't like bool - NotABug.org: Free code hosting」が過去の類似issueです。

既に修正しました:
https://notabug.org/TechnicalSuwako/gnusocial/src/main/extlib/MDB2/Driver/mysqli.php#L1649

PHP v8の動作確認用のDockerfileも追加しても良いかもしれません。

Dockerを使った事がありませんので、修正出来ると思いますが、テスト出来ません。
私が使っているパッケージ(Artix Linux):

  • world/php 8.2.9-3
  • world/php-cgi 8.2.9-3
  • world/php-dblib 8.2.9-3
  • world/php-embed 8.2.9-3
  • world/php-fpm 8.2.9-3
  • world/php-gd 8.2.9-3
  • world/php-odbc 8.2.9-3
  • world/php-pgsql 8.2.9-3
  • world/php-phpdbg 8.2.9-3
  • world/php-pspell 8.2.9-3
  • world/php-snmp 8.2.9-3
  • world/php-sodium 8.2.9-3
  • world/php-sqlite 8.2.9-3
  • world/php-tidy 8.2.9-3
  • world/php-xsl 8.2.9-3
  • extra/php-geoip 1.1.1-9
  • extra/php-igbinary 3.2.14-1
  • extra/php-imagick 3.7.0-4
  • extra/php-memcached 3.2.0-2
  • extra/php-redis 5.3.7-2
> 以前議論のあった参考情報を掲載します。GNU socialのDB関係のライブラリーのPEAR::MDB2が古くて、対応しきれていないのがPHP v8で特に問題になるようです。PostgreSQLなら回避できたりしませんかね?あるいは、PEAR::MDB2をやめて、標準ライブラリーを使うなど。 > > 「mysqli_num_rows() doesn't like bool - NotABug.org: Free code hosting」が過去の類似issueです。 既に修正しました:<br /> https://notabug.org/TechnicalSuwako/gnusocial/src/main/extlib/MDB2/Driver/mysqli.php#L1649 > PHP v8の動作確認用のDockerfileも追加しても良いかもしれません。 Dockerを使った事がありませんので、修正出来ると思いますが、テスト出来ません。<br /> 私が使っているパッケージ(Artix Linux): * world/php 8.2.9-3 * world/php-cgi 8.2.9-3 * world/php-dblib 8.2.9-3 * world/php-embed 8.2.9-3 * world/php-fpm 8.2.9-3 * world/php-gd 8.2.9-3 * world/php-odbc 8.2.9-3 * world/php-pgsql 8.2.9-3 * world/php-phpdbg 8.2.9-3 * world/php-pspell 8.2.9-3 * world/php-snmp 8.2.9-3 * world/php-sodium 8.2.9-3 * world/php-sqlite 8.2.9-3 * world/php-tidy 8.2.9-3 * world/php-xsl 8.2.9-3 * extra/php-geoip 1.1.1-9 * extra/php-igbinary 3.2.14-1 * extra/php-imagick 3.7.0-4 * extra/php-memcached 3.2.0-2 * extra/php-redis 5.3.7-2
senooken 1 yıl önce olarak yorumlandı
Sahibi

@TechnicalSuwako #14 でpull requestありがとうございました。明日か週末に確認しますのでお待ちください。

avatarGNU Social 2.1.0をテストしたい方へ: https://social-dev.076.moe 同じDBを使っていますので、本番で使っているユーザー名とパスワードでログインして下さい
@TechnicalSuwako #14 でpull requestありがとうございました。明日か週末に確認しますのでお待ちください。 <blockquote xmlns="http://www.w3.org/1999/xhtml" style="background:rgb(29,155,240);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="//social.076.moe/avatar/1-48-20230226093618.webp" style="height:4.5em" /><div><div><a href="https://social.076.moe/notice/832493">2023-08-30T03:55:24.000Z</a></div><div>テクニカル諏訪子|<a href="https://social.076.moe/suwako">suwako@social.076.moe</a></div></div></header><main><span style="white-space:pre-wrap;word-wrap:word-break">GNU Social 2.1.0をテストしたい方へ: https://social-dev.076.moe 同じDBを使っていますので、本番で使っているユーザー名とパスワードでログインして下さい</span></main></article></blockquote>
Giriş yap bu konuşmaya katılmak için.
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.