Question: Syntax Error Unexpected In In Mycontroller

Syntax Error Unexpected In In Mycontroller

Hello, Please there is a PHP Parse error: syntax error, unexpected '?' in /home/****/public_html/app/core/MY_Controller.php on line 106 It was gotten from my error log. Please what could

MN

Michael Nwuzor

Asked
Hello,

Please there is a PHP Parse error: syntax error, unexpected '?' in /home/****/public_html/app/core/MY_Controller.php on line 106

It was gotten from my error log. Please what could be responsible for that???

Thank you
  • MS

    Mian Saleem

    Answered
    Hello,

    SMA require php7, please update you php version to latest.

    Thank you
  • MN

    Michael Nwuzor

    Answered
    Yes I am using PHP 7
  • MS

    Mian Saleem

    Answered
    Hello,

    No. You are not using php7. If you using php7, you will never get that error as php7 support null coalescing operator.

    Thank you
  • MN

    Michael Nwuzor

    Answered
    I told you that I am using PHP Version 7. Please see attached image of the PHP selection page
  • MS

    Mian Saleem

    Answered
    Hello,

    Please check on the folder where you have installed the item or check with your server admin.

    **I do understand what you said and shared.** I am sure there is something wrong or you have different version set on SMA installation.

    You can check the version on folder by creating new phpinfo.php file with `<?php phpinfo(); ?>` in the folder.

    Thank you
  • MN

    Michael Nwuzor

    Answered
    Hello Mian Saleem,

    Thank you for your quick response and support.

    I did as you suggested by creating a phpinfo.php file with <?php phpinfo(); ?> .

    Please see attached image files for the responses. They still show PHP version 7

    If you still want me to ask my hosting company I will ask them but please check the files.
  • MS

    Mian Saleem

    Answered
    Hello,

    Please post full page screenshot. I need see the files with phpinfo and other sma files to make sure it's in correct folder and the info page.

    If you check the line in error you can see the `??` (null coalescing operator) and it is support and all versions of php7.

    *You can post private reply by enabling the `PRIVATE for Staff only` at top right of the reply section.*

    Thank you
  • MN

    Michael Nwuzor

    Answered
    Hi Mian,

    By " I need see the files with phpinfo and other sma files to make sure it's in correct folder and the info page." do you mean I post my login details so you can check the sma files???

    Yes I can post it as "PRIVATE for Staff only"
  • MS

    Mian Saleem

    Answered
    I have seen your site. It loading fine. Where are getting the error? What is the issue?
  • MN

    Michael Nwuzor

    Answered
    The error showed up in my error log.

    But you were arguing that I wasn't running PHP7. The issue wasn't even about my error but about the version of PHP that I am running.

    Are you convinced now that I am running PHP version 7???

    Thank you
    Mike
  • Login to Reply