Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony2][Symfony] php bin/console make:reset-password PHP Parse error: syntax error, unexpected...
miccom
post
Post #1





Grupa: Zarejestrowani
Postów: 493
Pomógł: 8
Dołączył: 7.07.2007
Skąd: Tychy

Ostrzeżenie: (0%)
-----


Cześć.

Loguję się do konsoli SSh na serwerze, chcę wykonać komendę ( w zasadzie jakąkolwiek... )

  1. php bin/console make:reset-password
  2. PHP Parse error: syntax error, unexpected '[' in /home/klient/bin/console on line 9


  1. #!/usr/bin/env php
  2. <?php
  3.  
  4. use App\Kernel;
  5. use Symfony\Bundle\FrameworkBundle\Console\Application;
  6. use Symfony\Component\Console\Input\ArgvInput;
  7. use Symfony\Component\ErrorHandler\Debug;
  8.  
  9. if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
  10. echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
  11. }
  12.  
  13.  
  14. require dirname(__DIR__).'/vendor/autoload.php';
  15.  
  16. if (!class_exists(Application::class)) {
  17. throw new LogicException('You need to add "symfony/framework-bundle" as a Composer dependency.');
  18. }
  19.  
  20. $input = new ArgvInput();
  21. if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
  22. putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
  23. }
  24.  
  25. if ($input->hasParameterOption('--no-debug', true)) {
  26. putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
  27. }
  28.  
  29. require dirname(__DIR__).'/config/bootstrap.php';
  30.  
  31. if ($_SERVER['APP_DEBUG']) {
  32. umask(0000);
  33.  
  34. if (class_exists(Debug::class)) {
  35. Debug::enable();
  36. }
  37. }
  38.  
  39. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  40. $application = new Application($kernel);
  41. $application->run($input);



Co nie działa w linii 9?

  1. miccom@ssh:~/my_web.pl$ php -v
  2. PHP 5.3.29-dh127 (cli) (built: Feb 23 2016 21:11:43)
  3. Copyright (c) 1997-2014 The PHP Group
  4. Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
  5. with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCube Ltd.


Ten post edytował miccom 15.03.2021, 17:59:42
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.09.2025 - 11:43