Skip to content

PHP Parse error: syntax error, unexpected identifier "NAME" #2337

Description

@semaf

Shlink version

4.4.0

PHP version

8.3

How do you serve Shlink

Self-hosted nginx

Database engine

MariaDB

Database version

10.11

Current behavior

Not installing with dist.

shortning@mee:~/htdocs/mee.it$ php vendor/bin/shlink-installer install
PHP Parse error: syntax error, unexpected identifier "NAME", expecting "=" in /home/shortning/htdocs/mee.it/module/CLI/src/Command/ShortUrl/CreateShortUrlCommand.php on line 23

Found this one here: https://github.com/shlinkio/shlink-installer
And the result as below.

shortning@mee:~/htdocs/mee.it$ php vendor/bin/shlink-installer install
PHP Fatal error: Uncaught Error: Class "Shlinkio\Shlink\Core\Config\EnvVars" not found in /home/shortning/htdocs/mee.it/config/config.php:30
Stack trace:
#0 /home/shortning/htdocs/mee.it/vendor/shlinkio/shlink-installer/config/container.php(31): require()
#1 /home/shortning/htdocs/mee.it/vendor/laminas/laminas-config-aggregator/src/ConfigAggregator.php(261): Shlinkio\Shlink\Installer{closure}()
#2 /home/shortning/htdocs/mee.it/vendor/laminas/laminas-config-aggregator/src/ConfigAggregator.php(86): Laminas\ConfigAggregator\ConfigAggregator->loadConfigFromProviders()
#3 /home/shortning/htdocs/mee.it/vendor/shlinkio/shlink-installer/config/container.php(38): Laminas\ConfigAggregator\ConfigAggregator->__construct()
#4 /home/shortning/htdocs/mee.it/vendor/shlinkio/shlink-installer/bin/shlink-installer(12): include('...')
#5 /home/shortning/htdocs/mee.it/vendor/bin/shlink-installer(119): include('...')
#6 {main}
thrown in /home/shortning/htdocs/mee.it/config/config.php on line 30

Docker compose file is complicated too. Could get it run due Port issues.
That https://github.com/thedxt/Shlink-docker has worked. But I dont want to use it with docker.

Expected behavior

Easy installation

Minimum steps to reproduce

Install Cloudpanel and test it as a user without root rights.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    troubleshootingTickets in which an issue was happening which was not obvious to solve and required support

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions