Just Installing Rep2/p2-php with PHP8.2.1 [5ch Frontend]

6 min

language: ja bn en es hi pt ru zh-cn zh-tw

hahah.png

Hello, I'm incompetent.

I'm installing Rep2 to view 2ch/5ch without app dependencies.

Since I'm currently using Artix Linux for PHP, PHP8.2.1 will be installed.
Additionally, I'll also install php-gd, php-fpm, imagemagick, and php-sqlite as dependencies.
It seems like other things also need to be installed, but the check mentioned later passed, so I'll consider it good for now.

sudo pacman -S php php-gd php-fpm imagemagick php-sqlite

First, I'll install the PHP8.* compatible version from mikoim's repository.

https://github.com/mikoim/p2-php

git clone git://github.com/open774/p2-php.git
cd p2-php

Clone it to my PC and navigate into the directory.

curl -O https://getcomposer.org/download/1.10.25/composer.phar
chmod +x composer.phar
./composer.phar install

Installing dependencies... but it will fail as is because the Dropbox API repository has been deleted.
If you've already run the above command, please clear the cache with `composer clear-cache`.

https://github.com/dropbox/dropbox-php-sdk/

So, I'll edit /p2-php/composer.json.

{
  "name": "open774/p2-php",
  "description": "The server side 2ch viewer written in PHP",
  "license": "X11",
  "repositories": [
    {
      "type": "pear",
      "url": "https://pear.php.net"
    },
    {
      "type": "vcs",
      "url": "https://github.com/open774/quickform"
    }
  ],
  "require": {
    "php": ">=5.3.6",
    "rsky/pear-core-min": "dev-master",
    "rsky/pear-pager": ">=2.4.9beta2",
    "rsky/pear-html_template_flexy": ">=1.3.13alpha6",
    "pear-pear.php.net/benchmark": "1.2.9",
    "pear-pear.php.net/cache_lite": "1.7.15",
    "pear-pear.php.net/db": "1.7.14",
    "pear-pear.php.net/db_dataobject": "1.11.2",
    "pear-pear.php.net/date": "1.4.7",
    "pear-pear.php.net/file": "1.4.1",
    "pear-pear.php.net/file_util": "1.0.0",
    "pear-pear.php.net/html_common": "1.2.5",
    "2ch774/quickform": "dev-master",
    "pear-pear.php.net/http_request2": "2.2.1",
    "pear-pear.php.net/net_socket": "1.0.10",
    "pear-pear.php.net/net_url": "1.0.15",
    "pear-pear.php.net/net_url2": "2.1.1",
    "pear-pear.php.net/net_useragent_mobile": "1.0.0",
    "pear-pear.php.net/validate": "0.8.5",
    "pear-pear.php.net/var_dump": "1.0.4",
    "pear-pear.php.net/xml_parser": "1.3.4",
    "pear-pear.php.net/xml_rss": "1.0.2",
    "symfony/console": "2.2.*",
    "symfony/yaml": "2.2.*",
    "jakeasmith/http_build_url": "1.0.*",
    "dropbox/dropbox-php-sdk": "dev-master"

  }
}

I'll replace "dropbox/dropbox-php-sdk": "dev-master" with the one published by volunteers.

"kunalvarma05/dropbox-php-sdk": "dev-master"

Now, running `./composer.phar install` should complete it.

I'll change the permissions.

chmod 0777 data/* rep2/ic

Then, since sqlite won't work as is, edit php.ini and
uncomment or add these two lines:
extension=pdo_sqlite
extension=sqlite3

Run the following to check.

php scripts/p2cmd.php check

Looks okay.

Test this and access localhost:8080.

cd rep2
php -S localhost:8080 web.php

...

So, I can confirm that errors are being output, which means I'll be editing it from now on.

There's a high chance I'll give up halfway, but I want to create a multi-platform environment that can be used with just HTTP, so I'll slowly work on it with a casual attitude.

I'll try my best to carry on the legacy of past volunteers, without forgetting their glory.
If it's impossible, sorry! (^o^)

Meow-sorry...
  / ̄ ̄ヽ ̄ ̄\
 ∠  レ  |  ⌒ヽ
  \__ノ丶  )|
   (_と__ノ⊂ニノ

Related Posts