Pass the path to a php.ini file to a child process#412
Pass the path to a php.ini file to a child process#412werdender wants to merge 4 commits intoyiisoft:masterfrom
Conversation
samdark
left a comment
There was a problem hiding this comment.
Good change 👍 but adjustment is needed.
Also need a line for CHANGELOG.md.
|
IMO this should be optional (it is not needed in 99.999% cases and produces noise in processes list) and configurable in more flexible way, like |
|
What @rob006 suggests makes sense. Let's make it optional. Otherwise, it's good. |
|
To be honest I don't think we need take care about process list, just look to the another processes - nobody is shy to pass arguments. Also I believe it's a little weird to ask "should I use the .ini file you provided?". Of course it should. One more thing: the goal is run application to an another server (reserve) without any changes in its configuration files. I can do it by changes in the .ini file, but it falls apart if we make it configurable. Looks like the passing arguments to the phpBinary even is not documented? |
This is not how your PR works. You could say that if you would set Also you're so fixated about your own edge, that you're forgetting that |
Description:
The problem is the child process ignores path to a php.ini file which was defined in supervisor tools like systemd. For example, if you have configured the
pdo_mysql.default_socketparameter (which must be different for different sites) in an ini file, and want to run the queue in systemd unit file like this:ExecStart=/usr/bin/php -c /var/www/somesite/php.ini /var/www/somesite/current/yii queue/listenthe passed -c parameter will be ignored by a child process and it will b still try using xx/cli/php.ini file and the wrong socket.
So, I've added the -c parameter to the child process.