• PHP Help
  • ssyntax error, unexpected 'include' (T_INCLUDE)

Parse error: syntax error, unexpected 'include' (T_INCLUDE) in /home/eurofdrm/public_html/ukpigeonracing/auction12/index.php on line 1

site in question https://www.ukpigeonracing.co.uk/auction12/

<?php/ /include 'common.php'; 
// Run cron according to SETTINGS as non-batchif ($system->SETTINGS['cron'] == 2){	include_once 'cron.php';}$fb_return_page = 'home';$_SESSION['REDIRECT_AFTER_LOGIN'] = 'home';$NOW = $system->CTIME;

(Added [code]...[/code] tags ~ Mod.)

    Not sure what's up with the "/" characters in the first line? Is that include supposed to be commented out, or what? Similarly, is everything in the 2nd line supposed to be commented out, or are we missing a newline here, or...?

      If the first line, regarding the include of common.php, is supposed to be commented out, the syntax is invalid.

      <?php
      
      // include 'common.php';
      # include "this_is_also_ignored";
      /* Another line that is ignored, but you must close the comment with the character combination...     */

      You also appear to have a problem with newlines; you might check your editor settings, upload settings, etc. It appears the original code was written with an "LF" newline character, and has been transferred into an environment that requires "CRLF", so the newlines were lost and all the code has ended up on, mostly, one line.

      I think you want this after the first line(s):

      // Run cron according to SETTINGS as non-batch
      if ($system->SETTINGS['cron'] == 2) {
          include_once 'cron.php';
      }
      $fb_return_page = 'home';
      $_SESSION['REDIRECT_AFTER_LOGIN'] = 'home';
      $NOW = $system->CTIME;
        Write a Reply...