Skip to content
Extraits de code Groupes Projets
Valider b64f149e rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #6013 #6012 make sure not to call console in case PHP is type CGI. In...

refs #6013 #6012 make sure not to call console in case PHP is type CGI. In type CGI the argv should not be registered anyway unless maybe for instance register-argc-argv is enabled
parent 8d1a98d0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -108,6 +108,11 @@ class Console extends Application ...@@ -108,6 +108,11 @@ class Console extends Application
} }
} }
public static function isSupported()
{
return Common::isPhpCliMode() && !Common::isPhpCgiType();
}
protected function initPiwikHost(InputInterface $input) protected function initPiwikHost(InputInterface $input)
{ {
$piwikHostname = $input->getParameterOption('--piwik-domain'); $piwikHostname = $input->getParameterOption('--piwik-domain');
......
...@@ -38,11 +38,14 @@ Using this 'archive.php' script is no longer recommended. ...@@ -38,11 +38,14 @@ Using this 'archive.php' script is no longer recommended.
Please use '/path/to/php $piwikHome/console core:archive " . implode('', array_slice($_SERVER['argv'], 1)) . "' instead. Please use '/path/to/php $piwikHome/console core:archive " . implode('', array_slice($_SERVER['argv'], 1)) . "' instead.
To get help use '/path/to/php $piwikHome/console core:archive --help' To get help use '/path/to/php $piwikHome/console core:archive --help'
See also: http://piwik.org/docs/setup-auto-archiving/ See also: http://piwik.org/docs/setup-auto-archiving/
If you cannot use the console because it requires CLI
try 'php archive.php -- url=http://your.piwik/path'
------------------------------------------------------- -------------------------------------------------------
\n\n"; \n\n";
} }
if (isset($_SERVER['argv']) && Piwik\Common::isPhpCliMode()) { if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) {
$console = new Piwik\Console(); $console = new Piwik\Console();
$console->init(); $console->init();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter