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.
Frage
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.
Lösung
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.
Andere Tipps
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