Ticket #1469 (assigned defect)

Opened 6 months ago

Last modified 2 weeks ago

module config files not parsed for CLI requests

Reported by: demian Assigned to: demian (accepted)
Priority: normal Milestone: 0.6.3
Component: not categorised Severity: in progress
Keywords: Cc:

Description

from Peter's email

However, I do not run the Manager via HTTP, but as a CLI request, and then the local conf.ini is not merged.
Here's what I did:
I copied my  global <host>.conf.php to localhost.conf.php. 
Run the following command line:
php /var/www/html/www.larus.nl/www/index.php --moduleName=export --managerName=RssMgr --action=news
Using the same breakpoint as you did in your code example, this shows a (partial) $conf: 
...
[TranslationMgr] => Array
        (
            [requiresAuth] => 1
            [adminGuiAllowed] => 1
        )
    [localConfig] => Array
        (
            [moduleName] => default 
        )
)
...
which obviously comes from the global config and contains no local config.
When I look again at the code in Frontcontroller I see the following:
...
    //  assign request to registry 
        $input = &SGL_Registry::singleton();
        $req   = &SGL_Request::singleton();
...
The SGL_Request::singleton brings you to 
...
class SGL_Request
{
    var $aProps;
    function init()
    {
        if ($this->isEmpty()) {
            $res = (!SGL::runningFromCLI())
                ? $this->initHttp()
                : $this->initCli();
        }
        return $res; 
    }
...
And there the code branches and for CLI commands you'll do the initCli(), which does not process SGL_UrlParser_SefStrategy(), where, as you mentioned the local config gets merged.

Attachments

1469.patch (5.3 kB) - added by aj on 07/16/07 04:29:50.

Change History

05/29/07 10:33:30 changed by demian

agreed with your analysis, basically local config parsing needs to be extracted from SGL_UrlParser_SefStrategy().

07/16/07 04:15:28 changed by aj

  • owner changed from somebody to aj.
  • severity changed from open to in progress.

07/16/07 04:29:50 changed by aj

  • attachment 1469.patch added.

07/17/07 03:20:34 changed by aj

  • owner changed from aj to demian.

07/19/07 17:16:58 changed by demian

  • status changed from new to assigned.

11/07/07 07:28:17 changed by petert

During tests with the new EmailqueueMgr? and Newsletter running via CLI, it seems that this has not been solved yet.