Mautic Community Forums

Cron error on new install

Greetings. I’m a noob here. I’ve just installed ver 2.3 on a shared server at InMotion Hosting. Nothing cron related is happening. No emails sent, segments not updating, etc. I’m getting cron errors related to CitrixBundle, but I don’t have any Citrix plugins configured. Here’s what I’m getting for every cron.

Code:
PHP Parse error: syntax error, unexpected '$result' (T_VARIABLE) in /home/username/email/plugins/MauticCitrixBundle/Helper/CitrixHelper.php on line 136

Here's how my jobs are formatted.
Code:
/usr/local/cpanel/username/bin/php /home/darrel13/email/app/console mautic:segments:update

I've confirmed with InMotion support that the php and app paths are correct. My shared server is running php 7.0 for my other sites. I thought that might be an issue with Mautic, so I modified .htacess for the Mautic root and now it's running. PHP Version 5.6.27. But still no joy on emails or segments.

Can I just delete /plugins/MauticCitrixBundle? I don't think I'm going to use any of those apps. For now at least.

Thanks!

Greetings. I’m a noob here. I’ve just installed ver 2.3 on a shared server at InMotion Hosting. Nothing cron related is happening. No emails sent, segments not updating, etc. I’m getting cron errors related to CitrixBundle, but I don’t have any Citrix plugins configured. Here’s what I’m getting for every cron.

PHP Parse error:  syntax error, unexpected '$result' (T_VARIABLE) in /home/username/email/plugins/MauticCitrixBundle/Helper/CitrixHelper.php on line 136

Here’s how my jobs are formatted.

/usr/local/cpanel/username/bin/php /home/darrel13/email/app/console mautic:segments:update

I’ve confirmed with InMotion support that the php and app paths are correct. My shared server is running php 7.0 for my other sites. I thought that might be an issue with Mautic, so I modified .htacess for the Mautic root and now it’s running. PHP Version 5.6.27. But still no joy on emails or segments.

Can I just delete /plugins/MauticCitrixBundle? I don’t think I’m going to use any of those apps. For now at least.

Thanks!

I’m at a complete loss here. Can anyone help???

I’ve just reinstalled 2.3.0. Plugins aren’t even installed in Mautic yet and I’m getting the same Cron errors. Test emails from configuration send, but emails to contacts do not. I’ve set the site to Php 5.6 and 7.0 with no effect.

InMotion L2 support figured it out for me!

If Mautic is set to queue emails, then they said you have to also go into Webhook Settings and change that to Queue Events Only.

As soon as I changed that, all of my test emails came through. This might be peculiar to InMotion Hosting.

Hope this helps others.

Sorry for bumping the thread:

I have the same problem with CitrixHelper.php on line 136 but the solution did not worked for me.

Any idea why this error is occuring when the segment cron is executed?

Thanks. Cli Php version was the problem. Now problem solved.

Thank you so much again.

@dogdayfear - How did you correct the Cli Php version? Did you change your PHP version in cpanel or just add -cli to the cron job?

I am getting the same error: (my mautic file is named “m”)

Parse error: syntax error, unexpected ‘$result’ (T_VARIABLE) in /home4/username/public_html/domain.com/m/plugins/MauticCitrixBundle/Helper/CitrixHelper.php on line 136

I have tried updating my cron job to:
php-cli /home4/username/public_html/domain.com/m/app/console mautic:campaigns:trigger

I have tried installing cronfig but can not get it to appear in the mautic plugins list.

Also I am relatively new to cron jobs and mautic, so any mautic-for-beginners language is appreciated :slight_smile:

Also I am running PHP 7.0

nevermind - found a fix . Thanks!

https://www.mautic.org/community/index.php/7167-campaign-emails-not-sent-fixed-parse-error-line-136-php-for-cro

@alainarae I have the same issue now, how did you fix it, please help!

@MxyzptlkFishStix How can I change the command line version?

I changed the Cron command from “php path-to-app/app/console…” to “php56 path-to-app/app/console…” and now I don’t get this error anymore, but I receive following message by email every time a Cron is executed:

[quote]Mautic version 2.7.1 - app/prod

Usage:
command [options] [arguments]

Options:
-h, --help Display this help message
etc…[/quote]

Is this the message I should get if the Crons are running correct?

@MxyzptlkFishStix hahah, of course not, it’s the path to where I installed Mautic on my hosting. However, I keep receiving above mentioned message when a Cron Job is executed.

Hi, i found this solution to set as default php version to 7 o whatever for CLi execution.
I Hope help!
http://www.drewkeller.com/blog/selecting-php-command-line-version-hostgator-shared-host