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

in Cron job, console command interprets -v, -vv -vvv as version, not verbose #5225

Closed
anonymous-matomo-user opened this issue May 25, 2014 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@anonymous-matomo-user
Copy link

When trying to run console core:archive via cron, documentation indicates that options -v -vv and -vvv change the verbosity level of the output. They do not have that effect, instead the PHP version is displayed.

PHP 5.4.28 (cgi-fcgi) (built: May  5 2014 00:18:15)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

Ran System Check and no issues found

Piwik 2.3.0-rc4
Apache 2.2.27
PHP Version 5.4.28
MySQL version 5.5.37-log
Architecture x86_64
Operating system linux

@mattab
Copy link
Member

mattab commented May 25, 2014

Can you please paste the full command you typed and full output? (minus the URL and any token you wish to keep secret)

@anonymous-matomo-user
Copy link
Author

Command is:

/usr/php/54/usr/bin/php -c /home1/behuntne/software/scripts/php.ini -f /home1/behuntne/public_html/pi1226/console -vvv core:archive --url=http://behunt.net/pi1226/

Only result is:

PHP 5.4.28 (cgi-fcgi) (built: May 5 2014 00:18:15)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

doesn't matter if I specify -v, -vv, or -vvv

Contents of the PHP INI file are:
[PHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limithh
memory_limit = 256M

; This directive determines whether PHP registers $argv & $argc each time it
; runs. $argv contains an array of all the arguments passed to PHP when a script
; is invoked. $argc contains an integer representing the number of arguments
; that were passed when the script was invoked. These arrays are extremely
; useful when running scripts from the command line. When this directive is
; enabled, registering these variables consumes CPU cycles and memory each time
; a script is executed. For performance reasons, this feature should be disabled
; on production servers.
; Note: This directive is hardcoded to On for the CLI SAPI
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/register-argc-argv
register_argc_argv = On

@tsteur
Copy link
Member

tsteur commented May 26, 2014

try

or

instead of

Otherwise the -vvv parameter is meant for the PHP script and our console script will not even be executed.

@anonymous-matomo-user anonymous-matomo-user added this to the 2.3.0 - Piwik 2.3.x milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants