Reputation: 1633
I'm trying to reindex my catalog_url_rewrite table (Magento website) through the command line using the command "php indexer.php --reindex catalog_url" in /shell. I get the following error:
PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/domain.com/lib/Zend/Db/Statement.php on line 141
The file and line on the error varies.
I've double checked to confirm that php in the command line is indeed using the php-cli version (by using "php -i") and that there are no limits in its config that should yield such an error.
I've also looked around to see if any magento file is setting the "set_time_limit" manually, but couldn't find anything that points that way. I can't find the 60 seconds max_execution_time anywhere.
Any idea on what's going on?
Edit:
So far I've tried:
Upvotes: 0
Views: 4985
Reputation: 66
It depends on your web server installation (Apache2 PHP, FPM ...), but you'll probably find a different php.ini for the CLI execution. Just set the time limit in the cli/php.ini configuration file and reload the web server configuration.
Upvotes: 0
Reputation: 24116
it is possible that the cli version of the PHP is using a different php.ini as opposed to the web server version of PHP.
You can remove the script execution time limit by adding this line (after <?php
of indexer.php
)
set_time_limit(0);
Src: http://php.net/manual/en/function.set-time-limit.php
Upvotes: 1