Answers.Body: <p>That could be an old version of php.  Assuming you are on current CiviCRM then try setting your php version to 7.3 See <a href="https://docs.civicrm.org/installation/en/latest/general/requirements/#php" rel="nofollow noreferrer">https://docs.civicrm.org/installation/en/latest/general/requirements/#php</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-15T17:41:06.493Z
Answers.Text: My hosting provider only allows up to PHP version 7.2.26
Answers.UserDisplayName: Julien Flesher
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-16T10:28:54.080Z
Answers.Text: Check that /usr/local/cpanel/3rdparty/bin/php is actually 7.2  Sometimes there are different executable names for different versions - eg .../bin/php7.1 ../bin/php7.2
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-16T13:19:54.727Z
Answers.Text: The Null Coalescing Operator has been available since PHP 7.0 https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-16T13:20:42.700Z
Answers.Text: I suspect Aidan is right and that your command line PHP is not 7+
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-17T23:03:08.570Z
Answers.Text: I checked with my hosting provider. They had me update the file path to usr/local/bin/php72
Answers.UserDisplayName: Julien Flesher
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-15T12:23:31.810Z
Answers.LastActivityDate: 2020-12-15T12:23:31.810Z
Answers.UserDisplayName: Aidan
Body: <p>I am using the following method to get cron to work with wordpress. It has worked in the past but recently (around December of 2019) it stopped working. It hasn't become too big of a problem until recently.</p>
  <p>/usr/local/cpanel/3rdparty/bin/php /home/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s SITE -u USERNAME -p PASSWORD -e Job -a execute</p>
  <p>The error that i get from cPanel is:</p>
  <p>PHP Parse error:  syntax error, unexpected '?' in /home/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php on line 214</p>
  <p>Can anyone help me figure out what to do.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-15T11:04:15.940Z
Comments.Text: Do you have any special characters in the username/password? Looks like and escape character problem (you could try surrounding the Username/Password in double quotes).
Comments.UserDisplayName: Parvez Saleh
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-15T17:38:52.510Z
Comments.Text: I do not have any special characters but I attempted to use double quotes and it didn’t help.
Comments.UserDisplayName: Julien Flesher
Tags: <wordpress><cron>
Title: Wordpress Cron not Running
ThreadText: # Wordpress Cron not Running
  
  (Asked by: username_0 on 2020-12-15)
  
  I am using the following method to get cron to work with wordpress. It has worked in the past but recently (around December of 2019) it stopped working. It hasn't become too big of a problem until recently.
  
  /usr/local/cpanel/3rdparty/bin/php /home/public\_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s SITE -u USERNAME -p PASSWORD -e Job -a execute
  
  The error that i get from cPanel is:
  
  PHP Parse error: syntax error, unexpected '?' in /home/public\_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php on line 214
  
  Can anyone help me figure out what to do.
  
  **Tags:** wordpress, cron
  
  > **Comments:**
  > **username_1**: Do you have any special characters in the username/password? Looks like and escape character problem (you could try surrounding the Username/Password in double quotes).  
  > **username_0**: I do not have any special characters but I attempted to use double quotes and it didn’t help.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-12-15. Score: 1 | Accepted answer
  
  That could be an old version of php. Assuming you are on current CiviCRM then try setting your php version to 7.3 See <https://docs.civicrm.org/installation/en/latest/general/requirements/#php>
  
  > **Comments:**
  > **username_0**: My hosting provider only allows up to PHP version 7.2.26  
  > **username_2**: Check that /usr/local/cpanel/3rdparty/bin/php is actually 7.2  Sometimes there are different executable names for different versions - eg .../bin/php7.1 ../bin/php7.2  
  > **username_3**: The Null Coalescing Operator has been available since PHP 7.0 https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op  
  > **username_3**: I suspect username_2 is right and that your command line PHP is not 7+  
  > **username_0**: I checked with my hosting provider. They had me update the file path to usr/local/bin/php72  
  
  ---
  
  