MyBB Community Forums

Full Version: 1.8.11 function.php problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi i got this error when try to running upgrade

/public_html/inc/functions.php on line 6947
looks like you have different set of problems. can you reupload functions.php file & check
(2017-04-05, 10:43 AM).m. Wrote: [ -> ]looks like you have different set of problems. can you reupload functions.php file & check

Parse error: syntax error, unexpected '[', expecting ')' in /home/xxxxx/public_html/inc/functions.php on line 6947

still same error
What is your PHP version?
(2017-04-05, 11:37 AM)doylecc Wrote: [ -> ]What is your PHP version?

5.3.29

Need fast solution Sad

Cant let my site down just like that
(2017-04-05, 11:54 AM)gamemaster Wrote: [ -> ]
(2017-04-05, 11:37 AM)doylecc Wrote: [ -> ]What is your PHP version?

5.3.29

Need fast solution Sad

Cant let my site down just like that

The used short array syntax with square brackets requires PHP 5.4 or newer.
If you can't upgrade your PHP version, try to change lines 6945-6964 in inc/functions.php to:

if($url_components['scheme'] == 'https' && $ca_bundle_path = get_ca_bundle_path())
{
    $context = stream_context_create(array(
        'ssl' => array(
            'verify_peer' => true,
            'verify_peer_name' => true,
            'peer_name' => $url_components['host'],
            'cafile' => $ca_bundle_path,
        ),
    ));
}
else
{
    $context = stream_context_create(array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false,
        ),
    ));
}
TQ MASTA Big Grin
(2017-04-05, 12:07 PM)doylecc Wrote: [ -> ]The used short array syntax with square brackets requires PHP 5.4 or newer.
If you can't upgrade your PHP version, try to change lines 6945-6964 in inc/functions.php to:

if($url_components['scheme'] == 'https' && $ca_bundle_path = get_ca_bundle_path())
{
    $context = stream_context_create(array(
        'ssl' => array(
            'verify_peer' => true,
            'verify_peer_name' => true,
            'peer_name' => $url_components['host'],
            'cafile' => $ca_bundle_path,
        ),
    ));
}
else
{
    $context = stream_context_create(array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false,
        ),
    ));
}

Thanks  You, That information help me to Upgrade!

Big Grin

[Image: Captura_de_pantalla_2017-04-05_a_las_9.49.40_a.m.png]