Mautic Community Forums

Cron error, Mautic not sending

Hi,

I running a self-hosted intsall of v2.1.1.

When “mautic:campaigns:trigger” cron has something to run, I get the following error. . .



================



0/1 [>---------------------------] 0%PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/autore15/email/app/bundles/EmailBundle/Entity/Email.php on line 299





[SymfonyComponentDebugExceptionFatalErrorException]

Parse Error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’





mautic:campaigns:trigger [-i|–campaign-id [CAMPAIGN-ID]] [-l|–batch-limit [BATCH-LIMIT]] [-m|–max-events [MAX-EVENTS]] [-f|–force] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [-n|–no-interaction] [-s|–shell] [-e|–env ENV]



================



When there are no new subscribers, that cron doesn’t spit an error message.



Both Mautic, and my server are running PHP Version 5.6.25 (I read a post where PHP version differences caused problems)



The Mautic error log, also gives me the following.



mautic.ERROR: Deprecation: The alias option of the form.type_extension tag of service “fos_rest.form.extension.csrf_disable” is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead. - in file PathToMautic/vendor/symfony/framework-bundle/DependencyInjection/Compiler/FormPass.php - at line 67 [] []



I don’t know what to do about either of these errors, or if they’re connected. Any ideas?



Keith



Much appreciated!

Hi,
I running a self-hosted intsall of v2.1.1.
When “mautic:campaigns:trigger” cron has something to run, I get the following error. . .

================

0/1 [>---------------------------] 0%PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/autore15/email/app/bundles/EmailBundle/Entity/Email.php on line 299

[SymfonyComponentDebugExceptionFatalErrorException]
Parse Error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’

mautic:campaigns:trigger [-i|–campaign-id [CAMPAIGN-ID]] [–scheduled-only] [–negative-only] [-l|–batch-limit [BATCH-LIMIT]] [-m|–max-events [MAX-EVENTS]] [-f|–force] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–]

================

When there are no new subscribers, that cron doesn’t spit an error message.

Both Mautic, and my server are running PHP Version 5.6.25 (I read a post where PHP version differences caused problems)

The Mautic error log, also gives me the following.

mautic.ERROR: Deprecation: The alias option of the form.type_extension tag of service “fos_rest.form.extension.csrf_disable” is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead. - in file PathToMautic/vendor/symfony/framework-bundle/DependencyInjection/Compiler/FormPass.php - at line 67 [] []

I don’t know what to do about either of these errors, or if they’re connected. Any ideas?

Keith

Much appreciated!

The second one isn’t an error - it’s just a notice, and you don’t have to worry about it.

The first one is looking to me like a PHP problem - double check that your server is on 5.6 (check the Mautic folder as well as your general settings; I had to change both).

If it’s not that, then I guess it’s possible part of the update failed. Maybe have a look here: https://www.mautic.org/community/index.php/conversation/post/16500

@Elenchus, thanks for the response! Looks like everything is now on 5.6.27. This was a fresh install, so it wasn’t a migration error. Any other ideas?