문제

I stumbled upon a weird problem with Magento indexer. I tried to run it via command line, but, no matter what I write, I get back the help screen. Even if I run php -f indexer.php info, I just get the help screen, but no error messages, either on screen or in the system log. What should I check to find out why the indexer doesn't want to run?

Thanks in advance for the answers.

도움이 되었습니까?

해결책

I found the answer. On the server where the script doesn't want to run, I have to use php-cli instead of php. It may have something to do with the server configuration.

I ran it as php-cli indexer.php info and I got the expected result.

다른 팁

most likely your shell files have been modified. Next function is responsible for showing the help screen, check it out in your shell/abstract.php, should look like this:

protected function _showHelp()
{
    if (isset($this->_args['h']) || isset($this->_args['help'])) {
        die($this->usageHelp());
    }
}

Try debugging the _args array inside the function. If the array is not what you've provided, check out _parseArgs function in the same file.

Do you need to separate your arguments with --?

php -f indexer.php -- info
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top