• Resolved oldcode

    (@coconutcoder)


    I’m developing on a local server (my laptop, Windows 10, XAMPP, PHP v5.5.15)

    The production server is Linux, PHP v5.6.14

    Using the Jupiter 4 theme, I can add a DIV in the header as the last element in “mk-header-right” div, in header.php:

    <div class="mk-header-right">
    
      <?php
        do_action('header_right_before');
    
        // to add elements using child themes
    
        //do_action('header_checkout');
    
        do_action('start_tour_link');
    
        do_action('header_social', 'header');
    
        do_action('header_search', 'header');
    
        do_action('header_copyright');
    
        do_action('header_right_after');
    
        // to add elements using child themes
    
    ?>
        <div class="contact-header">
          <h2>XXX-XXX-XXXX<br>
          Miami-Florida</h2>
        </div>
      </div>

    With the proper styling of a class contact-header in the themes/jupiter/stylesheet/css/styles.css it shows up just fine in my header.

    Verifying that it works and causes no problems, I copy the header.php to the production server on HostGator, and I suddenly get a php error:

    Parse error: syntax error, unexpected '$mk_options' (T_VARIABLE) in /home4/xxxxxx/public_html/wp-content/themes/jupiter/header.php on line 1

    I copy the backup of the original header.php back to wp-content/themes/jupiter on the production server, and the website works again.

    I’ve done this several times to confirm that it’s this bit of html, the new div block added to header.php, that is causing the php error on the production server. But on my local development server, the code works.

Viewing 1 replies (of 1 total)
  • Thread Starter oldcode

    (@coconutcoder)

    I fixed the problem when I closed FileZilla FTP, then re-opened it, and did the upload again. It looks like the problem had something to do with a quirk of the upload (upload data type was set to auto, as I always have it, so I don’t know if there might have been a problem there). Anyway, it seemed to fix itself, so the error wasn’t specifically a problem with my coding.

Viewing 1 replies (of 1 total)
  • The topic ‘Jupiter 4 Theme problem : "unexpected '$mk_options' (T_VARIABLE)"’ is closed to new replies.