Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failing #300

Open
Hoerli1337 opened this issue Mar 24, 2024 · 3 comments
Open

Install failing #300

Hoerli1337 opened this issue Mar 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Hoerli1337
Copy link

Hello!

I've tried EvoSC, but can't get it installed right now.

  • Debian 12 LXC (Proxmox)
  • MariaDB
  • php7.4 / 8.3

TM Server is installed and running locally on the system.
MariaDB / MySQL is installed and a user with the appropriate database is set up.
The PW for the user also has no special characters so as not to destroy the formatting (§ = not good).
Now it's EvoSC's turn....

I have tried php7.4 as it is specified on the website.
apt install -y php7.4 php7.4-simplexml php7.4-mbstring php7.4-gd php7.4-dom php7.4-mysql php7.4-curl php7.4-zip php7.4-pcntl composer
I also tried php8.3 in order to have a current version.
With php8.3 I get at least the fewest errors and the setup almost runs through.
apt install -y php8.3 php8.3-simplexml php8.3-mbstring php8.3-gd php8.3-dom php8.3-mysql php8.3-curl php8.3-zip composer

Download EvoSC now...

# git clone https://github.com/EvoTM/EvoSC.git
# cd EvoSC
# composer i --no-dev

Here is the output of it:

gameserver@ctTm2020Test:~/EvoSC$ composer i --no-dev
> php core/required_directories.php
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 47 installs, 0 updates, 0 removals
  - Installing composer/ca-bundle (1.3.3): Extracting archive
  - Installing psr/log (1.1.4): Extracting archive
  - Installing psr/cache (1.0.1): Extracting archive
  - Installing doctrine/event-manager (1.1.1): Extracting archive
  - Installing doctrine/deprecations (v1.0.0): Extracting archive
  - Installing doctrine/cache (2.2.0): Extracting archive
  - Installing doctrine/dbal (3.3.7): Extracting archive
  - Installing symfony/polyfill-php72 (v1.26.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.26.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.26.0): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-message (1.1): Extracting archive
  - Installing guzzlehttp/psr7 (1.9.1): Extracting archive
  - Installing guzzlehttp/promises (1.5.1): Extracting archive
  - Installing guzzlehttp/guzzle (6.5.8): Extracting archive
  - Installing symfony/polyfill-php80 (v1.26.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.26.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.26.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.26.0): Extracting archive
  - Installing symfony/string (v5.4.10): Extracting archive
  - Installing symfony/deprecation-contracts (v2.5.2): Extracting archive
  - Installing psr/container (1.1.2): Extracting archive
  - Installing symfony/service-contracts (v2.5.2): Extracting archive
  - Installing symfony/polyfill-php73 (v1.26.0): Extracting archive
  - Installing symfony/console (v5.4.10): Extracting archive
  - Installing voku/portable-ascii (1.6.1): Extracting archive
  - Installing symfony/translation-contracts (v2.5.2): Extracting archive
  - Installing symfony/translation (v5.4.9): Extracting archive
  - Installing nesbot/carbon (2.59.1): Extracting archive
  - Installing illuminate/macroable (v8.83.22): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing illuminate/contracts (v8.83.22): Extracting archive
  - Installing illuminate/collections (v8.83.22): Extracting archive
  - Installing doctrine/inflector (2.0.4): Extracting archive
  - Installing illuminate/support (v8.83.22): Extracting archive
  - Installing illuminate/container (v8.83.22): Extracting archive
  - Installing illuminate/database (v8.83.22): Extracting archive
  - Installing symfony/var-dumper (v5.4.9): Extracting archive
  - Installing larapack/dd (1.1): Extracting archive
  - Installing latte/latte (v2.11.5): Extracting archive
  - Installing league/csv (9.8.0): Extracting archive
  - Installing manialib/gbx (4.1.1): Extracting archive
  - Installing maniaplanet/dedicated-server-api (dev-master 5201745): Extracting archive
  - Installing mexitek/phpcolors (v1.0.4): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v1.1.13): Extracting archive
  - Installing symfony/event-dispatcher (v4.4.42): Extracting archive
  - Installing symfony/process (v4.4.41): Extracting archive
Generating autoload files
29 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

php7.4 does not find all the necessary components here, which is why php7.4 is the end of the fun.
You can get further with php8.3.

# php esc run

And the output of it:

Deleting stale configs...
Starting EvoSC Setup.
[server 1/5] Enter your server ip[localhost]: localhost
[server 2/5] Enter the RPC port[5000]: 5004
[server 3/5] Enter the RPC login[SuperAdmin]: SuperAdmin
[server 4/5] Enter the RPC password[SuperAdmin]: SuperAdmin123!
[server 5/5] Enter the default match-settings filename[maplist.txt]: maplist.txt
Configuration of server.config.json finished.
[database 1/4] Enter the database host (can you add port with :3307)[localhost]: localhost
[database 2/4] Enter the name of the database: tmserverdb
[database 3/4] Enter the database-users name: tm2020test
[database 4/4] Enter the database-users password: blablablablablabla
Configuration of database.config.json finished.
Configure dedimania? [y/n]: n
Configure ManiaExchange-Karma? [y/n]: n
Configure music server url? [y/n]: n
Executing migrations...
Nothing to migrate.
[18:38:21] Database::init(): Connecting to database...
[18:38:21] Database::init(): Database connected.
AccessRights-Setup started.
Do you want to load the default configuration [y/N]?y
PHP Warning:  Attempt to read property "id" on null in /home/gameserver/EvoSC/core/Commands/SetupAccessRights.php on line 115
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'access_right_id' cannot be null (SQL: insert into `access_right_group` (`group_id`, `access_right_id`, `access_right_name`) values (2, ?, local_delete))
PHP Fatal error:  Uncaught ValueError: Path cannot be empty in /home/gameserver/EvoSC/core/Commands/EscRun.php:164
Stack trace:
#0 /home/gameserver/EvoSC/core/Commands/EscRun.php(164): file_put_contents()
#1 /home/gameserver/EvoSC/vendor/symfony/console/Command/Command.php(283): EvoSC\Commands\EscRun->interact()
#2 /home/gameserver/EvoSC/vendor/symfony/console/Application.php(1024): Symfony\Component\Console\Command\Command->run()
#3 /home/gameserver/EvoSC/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#4 /home/gameserver/EvoSC/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#5 /home/gameserver/EvoSC/esc(64): Symfony\Component\Console\Application->run()
#6 {main}
  thrown in /home/gameserver/EvoSC/core/Commands/EscRun.php on line 164

If I try to start EvoSC, this does not work either.

gameserver@ctTm2020Test:~/EvoSC$ php esc run
Deleting stale configs...
Executing migrations...
Nothing to migrate.
Connecting to server...
Connection established.
                   ▄▄▄▄▄▄▄▄▄
             ▄▄█████████████████▄▄
          ▄█████████████████████▀▀
        ████████████████████▀▀
      ▄████████████████▀▀
     █████████████▀▀                  ▄▄▄
    ▐████████▀▀               ▄▄▄█████████      EvoSC v0.99.100
    █████▀             ▄▄▄████████████████▌     https://github.com/EvoTM/EvoSC
    ▀▀         ▄▄▄████████████████████████▌
        ▄▄████████████████████▀▀▀▀▀▀▀
    ████████████▀▀▀▀▀▀
     ▀▀
         ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄═
       ▀███████████████████████████████▀
         ▀███████████████████████████▀
           ▀▀█████████████████████▀
               ▀▀▀██████████▀▀▀

[18:56:53] EscRun->execute(): Starting...
[18:56:53] Database::init(): Connecting to database...
[18:56:53] Database::init(): Database connected.
[18:56:53] TemplateController::loadTemplates(): Loading templates...
[18:56:53] ChatController::init(): Chat router started.
[18:56:53] File::makeDir(): Directory '/home/gameserver/EvoSC/cache/gbx' created.
[18:56:53] MapController::loadMaps(): Loading maps
.....
[18:56:54] CountdownController::getTimeLimitFromMatchSettings(): Time limit not set in match-settings, using default.
[18:56:54] ModuleController::startModules(): Starting modules...
....[18:56:54] AddTime::start(): Copied configs from "added-time-info", restarting EvoSC.
PHP Fatal error:  Uncaught TypeError: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, false given, called in /home/gameserver/EvoSC/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98 and defined in /home/gameserver/EvoSC/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:928
Stack trace:
#0 /home/gameserver/EvoSC/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(98): Carbon\Carbon::setLastErrors()
#1 /home/gameserver/EvoSC/core/global-functions.php(307): Carbon\Carbon->__construct()
#2 /home/gameserver/EvoSC/core/Controllers/CountdownController.php(74): now()
#3 /home/gameserver/EvoSC/core/Controllers/ControllerController.php(36): EvoSC\Controllers\CountdownController::stop()
#4 /home/gameserver/EvoSC/core/global-functions.php(449): EvoSC\Controllers\ControllerController::stopControllers()
#5 /home/gameserver/EvoSC/core/global-functions.php(419): shutdown_evosc()
#6 /home/gameserver/EvoSC/core/Modules/AddTime/AddTime.php(35): restart_evosc()
#7 /home/gameserver/EvoSC/core/Controllers/ModuleController.php(169): EvoSC\Modules\AddTime\AddTime::start()
#8 /home/gameserver/EvoSC/vendor/illuminate/collections/Traits/EnumeratesValues.php(245): EvoSC\Controllers\ModuleController::EvoSC\Controllers\{closure}()
#9 /home/gameserver/EvoSC/core/Controllers/ModuleController.php(139): Illuminate\Support\Collection->each()
#10 /home/gameserver/EvoSC/core/Commands/EscRun.php(248): EvoSC\Controllers\ModuleController::startModules()
#11 /home/gameserver/EvoSC/vendor/symfony/console/Command/Command.php(298): EvoSC\Commands\EscRun->execute()
#12 /home/gameserver/EvoSC/vendor/symfony/console/Application.php(1024): Symfony\Component\Console\Command\Command->run()
#13 /home/gameserver/EvoSC/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#14 /home/gameserver/EvoSC/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#15 /home/gameserver/EvoSC/esc(64): Symfony\Component\Console\Application->run()
#16 {main}
  thrown in /home/gameserver/EvoSC/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 928

What is the problem here?
What am I doing wrong?

@Hoerli1337 Hoerli1337 added the bug Something isn't working label Mar 24, 2024
@TeslaHack
Copy link

hey i fix this by changing Creator.php

File Path ./vendor/nesbot/carbon/src/Carbon/Traits/Creator.php

Line No: 928

Old Line

private static function setLastErrors(array $lastErrors)

New Line

private static function setLastErrors($lastErrors)

@Chris92de
Copy link
Member

Hi, you said with PHP7.4 composer can't find all dependencies, however in the log you posted, that seemed to work just fine.
What version of MySQL/MariaDB are you using? EvoSC does not support MySQL 8 at the moment, so we recommend sticking to MySQL 5.7 or MariaDB.
Also, PHP8+ compatibility is not guaranteed.

@Hoerli1337
Copy link
Author

hey i fix this by changing Creator.php

File Path ./vendor/nesbot/carbon/src/Carbon/Traits/Creator.php

Line No: 928

Old Line

private static function setLastErrors(array $lastErrors)

New Line

private static function setLastErrors($lastErrors)

I changed the line and was able to start EvoSC with php8.3 without any problems.
I'll test everything and see if I can find any more errors.
20240325110433_1

Hi, you said with PHP7.4 composer can't find all dependencies, however in the log you posted, that seemed to work just fine. What version of MySQL/MariaDB are you using? EvoSC does not support MySQL 8 at the moment, so we recommend sticking to MySQL 5.7 or MariaDB. Also, PHP8+ compatibility is not guaranteed.

I use the standard packages from the Debian repos.

MariaDB [(none)]> select @@version;
+---------------------------+
| @@version                 |
+---------------------------+
| 10.11.6-MariaDB-0+deb12u1 |
+---------------------------+
1 row in set (0.000 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants