Cron 500 Errors

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

I saw another post with somebody having similar issues (still looks unresolved), but I tried the following URLs noted in the thread:

https://www.mydomain.com/cron/cron.task ... y_sessions

That gives the following error:

Code: Select all

[10-Jan-2021 15:05:40 UTC] PHP Fatal error:  Uncaught Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("cron_type") to generate a URL for route "phpbb_cron_run". in /public_html/vendor/symfony/routing/Generator/UrlGenerator.php:136
Stack trace:
#0 /public_html/cache/production/url_generator.php(52): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'phpbb_cron_run', 1, Array, Array)
#1 /public_html/phpbb/routing/router.php(168): phpbb_url_generator->generate('phpbb_cron_run', Array, 1)
#2 /public_html/phpbb/routing/helper.php(148): phpbb\routing\router->generate('phpbb_cron_run', Array, 1)
#3 /public_html/phpbb/controller/helper.php(212): phpbb\routing\helper->route('phpbb_cron_run', Array, false, false, 1)
#4 /public_html/cron.php(34): phpbb\controller\helper->route('phpbb_cron_run', Array, false)
#5 {main}
  thrown in /public_html/vendor/symfony/routing/Generator/UrlGenerator.php on line 136

I also tried:
https://www.mydomain.com/cron.php?cron_ ... y_sessions

Which forwards to www.mydomain.com/cron/cron.task.core.tidy_sessions and gives the following error:

Code: Select all

[10-Jan-2021 15:28:48 UTC] PHP Fatal error:  Uncaught Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("cron_type") to generate a URL for route "phpbb_cron_run". in /public_html/vendor/symfony/routing/Generator/UrlGenerator.php:136
Stack trace:
#0 /public_html/cache/production/url_generator.php(52): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'phpbb_cron_run', 1, Array, Array)
#1 /public_html/phpbb/routing/router.php(168): phpbb_url_generator->generate('phpbb_cron_run', Array, 1)
#2 /public_html/phpbb/routing/helper.php(148): phpbb\routing\router->generate('phpbb_cron_run', Array, 1)
#3 /public_html/phpbb/controller/helper.php(212): phpbb\routing\helper->route('phpbb_cron_run', Array, false, false, 1)
#4 /public_html/cron.php(34): phpbb\controller\helper->route('phpbb_cron_run', Array, false)
#5 {main}
  thrown in /public_html/vendor/symfony/routing/Generator/UrlGenerator.php on line 136

In both cases (which are obviously doing the same thing) I get a 500 error reported in the browser window.


Thanks,
Josh
rxu
Extensions Development Team
Posts: 3456
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Cron 500 Errors

Post by rxu »

Is there a chance you have Enable URL Rewriting setting set to Yes (in ACP/Server settings) while server-side URL rewriting (like mod_rewrite for Apache) is not activated or is not properly operating?
User avatar
EA117
Registered User
Posts: 1970
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Cron 500 Errors

Post by EA117 »

KungFuJosh wrote:
Sun Jan 10, 2021 3:35 pm
I tried the following URLs noted in the thread:
The first of those two tests does confirm to me that this "missing mandatory parameters" condition occurs even when the actual original inbound HTTP request did contain a properly formed and valid parameter for the cron service. So that at least rules out some bad user agent who is simply sending malformed or incomplete requests.

rxu wrote:
Sun Jan 10, 2021 4:19 pm
Is there a chance you have Enable URL Rewriting setting set to Yes (in ACP/Server settings) while server-side URL rewriting (like mod_rewrite for Apache) is not activated or is not properly operating?
What do you make of the fact that both of these latest test call stacks originate out of cron.php? I'm not seeing how or why /cron.php would have still been involved for a /cron/ route request. Could assume maybe this log entry just doesn't correspond to the actual test cited, but just checking whether maybe I'm missing something else.
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

rxu wrote:
Sun Jan 10, 2021 4:19 pm
Is there a chance you have Enable URL Rewriting setting set to Yes (in ACP/Server settings) while server-side URL rewriting (like mod_rewrite for Apache) is not activated or is not properly operating?
It is set to yes in ACP, and the first 3 lines of my htaccess are:

Code: Select all

Options -Indexes +FollowSymlinks -MultiViews
RewriteEngine on
RewriteBase /
Is this other note relevant?:

# Apache content negotation tries to interpret non-existent paths as files if
# MultiViews is enabled. This will however cause issues with paths containg
# dots, e.g. for the cron tasks


Thanks,
Josh
rxu
Extensions Development Team
Posts: 3456
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Cron 500 Errors

Post by rxu »

KungFuJosh wrote:
Tue Jan 12, 2021 11:42 pm
It is set to yes in ACP
Will you get same errors if set it to No?
Post Reply

Return to “[3.3.x] Support Forum”