This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Commentics 4.1 installation issue on PHP 5.3
#1

Hello,

I  was in the process of installation of Commentics 4.1 on PHP 5.3.29 , Apache 2.2.34, MYSQL 5.5.62

However I  face this issue while starting the installation i.e :

Parse error: syntax error, unexpected '[' in /home/{{USERDIR}}/public_html/commentics/{{ADMIN-FOLDER}}/index.php on line 9

This is due to the array syntax of PHP 5.4 being used from line no 9 in index.php i.e :

$session_parameters = [
    'cookie_httponly'  => 1,
    'use_only_cookies' => 1,
    'use_trans_sid'    => 0,
    'gc_maxlifetime'  => 1440,
    'cookie_lifetime'  => 0,
    'cookie_path'      => '/',
    'cookie_secure'    => 0
];

Could you please fix this ?. Documentation mentions PHP 5.3.7 or higher required

https://www.commentics.org/requirements
Reply
#2

Hi John,

Thanks for letting me know. With there being so few users on PHP 5.3, and with that number only decreasing, I need to decide if it's worth releasing a new version or if I should update the requirements to PHP 5.4. In the meantime the fix for this is quite simple if you want to implement it yourself.

In these files:
  • /commentics/backend/index.php
  • /commentics/frontend/index.php
  • /commentics/install/index.php
  • /commentics/iframe.php

The array syntax needs changing from:
PHP Code:
<?php 
$session_parameters
= [

To this:
PHP Code:
<?php 
$session_parameters
= array(

And from:
PHP Code:
<?php 
];

To this:
PHP Code:
<?php 
);

If you have any trouble just let me know and I'll attach the above files.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by WhatSay
15-Aug-2020, 02:11 PM
Last Post by rol
16-Feb-2020, 02:18 PM
Last Post by Steven
23-May-2019, 07:20 PM
Last Post by RJCS
06-May-2019, 09:28 PM
Last Post by lastejas
29-Sep-2018, 02:03 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)