Syntax error, unexpected?

I have just installed version 1.12.4 and are using automatic installation at from my host site5.com. usually installations goes fine, but this is the message I'm getting when trying to access both the index.php file and also the admin area after the installation.  engine/classes/Elgg/Di/ServiceProvider.php on line 207

  • Elgg 1.12 requires version 5.4 of php at minimum. It's very likely you see this error because there's only an older version of php installed on your server.

  • Thank you very much. I checked the info and it says:


    Database Server: Server version: 5.5.40-36.1-log - Percona Server (GPL), Release 36.1, 
    Webserver: Database client version: libmysql - 5.1.73Php Myadmin: Version information: 4.0.10.7, latest stable version: 4.5.0.2

    I havent done any installation lately, but used to do it many years ago. I have copied  info, because I'm not sure wich one it referes to.

  • The version information you listed are not about php but for the MySQL database server and the phpMyAdmin tool.

    But it's the version of the php interpreter that is relevant here. If you have shell access to your server, you can find out about the version installed by entering "php -v" on the command line. Alternatively, you should see the version information somewhere in the server's admininstration area (CPanel, WHM or whatever used on your server). Or you can use phpinfo() to display such information. In this case place the following script code in the root directory of your Elgg installation:

    <?php
      phpinfo();
    ?>

    and name the script for example phpinfo.php. Then call this script in your browser by the url "your.site.url/phpinfo.php&quot; and you should see the version of php installed. As I said previously, the minimum version required for Elgg 1.12 is php 5.4.

  • Thanks for helping me, and you are of course right.

    I found it:

    PHP 5.3 is currently the default version that will be used by PHP files.

  • I have found the solution:
    Using PHP 5.4 is completely optional as all scripts have not yet released compatible versions! To use PHP 5.4, you have two options:

    1. Use the file extension .php54
    2. Add the following line to your .htaccess file:


    AddHandler application/x-httpd-php54 .php