cronjobs | CLI error Mautic 2.01

Hi



/var/www/vhosts/xxxxxx.com/httpdocs/subdomein_mautic2/app/console mautic:campaigns:trigger

or any other mautic cronjob



gives:



PHP Parse error: syntax error, unexpected ‘[’ in /var/www/vhosts/xxxxxx.com/httpdocs/subdomein_mautic2/app/AppKernel.php on line 58



Any thoughts?

Hi

/var/www/vhosts/xxxxxx.com/httpdocs/subdomein_mautic2/app/console mautic:campaigns:trigger
or any other mautic cronjob

gives:

PHP Parse error: syntax error, unexpected ‘[’ in /var/www/vhosts/xxxxxx.com/httpdocs/subdomein_mautic2/app/AppKernel.php on line 58

Any thoughts?

Never mind…server-issue
Domain is running php 5.6.23
Server is on php 5.3

Never mind — server issue

domain is running 5.6.23
server is on 5.3

Maxjo, I have the same issue. All my folders are using 5.6 in cpanel including home. Do you know a work around?

@joew No, unfortunately

Maxjo, I contacted my shared host (siteground) they told me to do the following that worked:

“However, you can execute your cron job with PHP 5.6 using the below command:
Code”:

/usr/local/php56/bin/php-cli -f /home/MyPath/public_html/app/console mautic:segments:update --env=prod

“You can see that it is working with PHP 5.6”:

Code:
MYPAth@MyHost [~]# /usr/local/php56/bin/php-cli -f /home/MyPath/public_html/app/console mautic:segments:update --env=prod
Rebuilding contacts for segment 1
0 total contact(s) to be added in batches of 300
total contact(s) to be removed in batches of 300
0 contact(s) affected

@joew

In my case: php5.6 on Ubuntu 12.04 | Plesk 12.5

/opt/plesk/php/5.6/bin/php  /var/www/vhosts/domainname.com/httpdocs/mautic_location/app/console mautic:campaigns:trigger

is working now!

Thanks.