Home / Forums / DynamiX Support / unexpected T_FUNCTION error

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts

  • Victor
    Participant

    hi,

    been using dynamix for quite sometime. Never had a problem with upgrading except the 4.2.1.
    I’ve got this error right after the upgrade completed:
    Parse error: syntax error, unexpected T_FUNCTION in /home1/haesaa/public_html/haes/haes_2.0/wp-content/themes/DynamiX/lib/inc/sub-functions.php on line 166

    I’ve tried downloading from themforest and replaced the folder but still came out with the same error. Please help.

    Andy
    Andy
    Keymaster

    Hi,

    That relates to a PHP function. It would suggest you’re using an old version of PHP and your host needs to upgrade. I had to change it in the last version due to other users who are using later versions of PHP no longer being able to use the old function.

    If that’s not feasible for your host to do that, if you post your WP login details, I can change the function for you. Ultimately, you’ll need to upgrade PHP at some point as the previous function is now deprecated.


    Victor
    Participant

    Hi Andy,

    thanks for the respond. It uses php 5.4 by default. Do i need to contact my hosting to upgrade it for me or i should do it by my self? Also, which version of PHP do i need to upgrade to?

    I will send you my login details and please change it for me for the time being. Thanks alot Andy!


    Victor
    Participant
    This reply has been marked as private.
    Raymond Stuwe
    Raymond Stuwe
    Participant

    Hi Andy i have right now the same problem – How can i Fix that?

    regards raymond


    Rupert Weis
    Participant

    Hi
    I got the same error message.
    But already checked mysql and it uses 5.6.19, which is not the latest, but also not outdated.
    Any suggestion how to go on.
    http://www.touching-indias-heart.com
    Regards, Rupert


    Victor
    Participant

    Hi Rupert,

    According to Andy the error is not related to mySQL version but it’s to do with php version. I’ve been trying to get some help from my provider but its not going quick. Hopefully Andy could come up with a temp solution soon.


    Victor
    Participant

    I actually managed to upgrade my php to ver 5.5 via cpanel. Everything is fine now.

    Raymond Stuwe
    Raymond Stuwe
    Participant

    I try to add AddHandler php55-cgi .php to my .htaccess

    hope its helps me

    Andy
    Andy
    Keymaster

    Hey Guys,

    If you’re using PHP 5.2 or less, you’ll run into this issue. Most hosting companies are running at least 5.3 now.

    For those who are stuck, please edit DynamiX/lib/inc/sub-functions.php

    Replace:

    $class_string = preg_replace_callback('/vc_col-sm-(\d{1,2})/',
    function($this)
    {
    return numberToWords($this[1],'vc');
    },
    $class_string
    );

    With the following:

    $class_string = preg_replace('/vc_col-sm-(\d{1,2})/e', "numberToWords($1,'vc')", $class_string );


    Rupert Weis
    Participant

    thank you Victor,
    found it now and changed the php version.
    cheers, Rupert

    Raymond Stuwe
    Raymond Stuwe
    Participant

    Hi

    i add AddHandler php55-cgi .php to my .htaccess and everything is working

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.