You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several issues for me with the archiving via cron when I have a custom php executable and a custom php.ini file.
First of all the console uses hardcoded the php executable found in the PATH variable through the shebang in the console script. I can workaround this with the following call:
hash /usr/local/software/php/5.5.15/bin/php php && /usr/local/software/php/5.5.15/bin/php -c .../my_custom_php.ini .../piwik/console core:archive ...
So instead of using the system wide php binary the same php executable is used which is used to invoke the console (as long as the path to the custom php executable is the same as the one set with "hash /usr/local/software/php/5.5.15/bin/php php") including all passed parameters like a custom .ini file.
But the parameter "-c" is not passed to the forked php process done by CLI archiving. I think this should be done by the CliPhp class which returns the path to the PHP binary. Arguments for the php executable should be added there.
I have this problem as the json extension is not installed system wide but only through my custom ini file which results in an error as piwik has the wrong ini file.
I hope the problem description is understandable.
The text was updated successfully, but these errors were encountered:
We're most likely taking the PPH version defined in the constant PHP_BINARY. This should be the PHP binary path of the current script execution. The -c option is a good point, we should actually indeed forward this option, maybe not all options though (I'm not sure we'd probably just have to read over several options) 👍
There are several issues for me with the archiving via cron when I have a custom php executable and a custom php.ini file.
First of all the console uses hardcoded the php executable found in the PATH variable through the shebang in the console script. I can workaround this with the following call:
hash /usr/local/software/php/5.5.15/bin/php php && /usr/local/software/php/5.5.15/bin/php -c .../my_custom_php.ini .../piwik/console core:archive ...
So instead of using the system wide php binary the same php executable is used which is used to invoke the console (as long as the path to the custom php executable is the same as the one set with "hash /usr/local/software/php/5.5.15/bin/php php") including all passed parameters like a custom .ini file.
But the parameter "-c" is not passed to the forked php process done by CLI archiving. I think this should be done by the CliPhp class which returns the path to the PHP binary. Arguments for the php executable should be added there.
I have this problem as the json extension is not installed system wide but only through my custom ini file which results in an error as piwik has the wrong ini file.
I hope the problem description is understandable.
The text was updated successfully, but these errors were encountered: