This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: "Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in home/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php on line Solution: We updated PHP to 7.2 (the latest version available on our server) and it works fine again.

This topic contains 2 replies, has 2 voices.

Last updated by Claudio Prandoni 1 month, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
September 11, 2019 at 9:42 am #4552251

Claudio Prandoni

I've just updated all WPML plugins to the last version (WPML Media, WPML Multilingual CMS, WPML Sticky links, WPML String translation, WPML Translation Management) but, after that, I'm getting an error message every time I try to access the website or the admin control panel. The message is:

"Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in /web/htdocs/www.aedeka.com/home/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php on line 8"

To restore access to the website and the control panel I have to comment lines 8 and 812 of /sitepress-multilingual-cms/inc/functions.php...

What's happining? How can I resolve this?

Link to a page where the issue can be seen: hidden link, hidden link

Thank for your help!

Claudio Prandoni

September 11, 2019 at 10:16 am #4552453

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Can you make sure that your server conforms to our minimum requirements? From what I see, not only that you don't have enough memory (40M which is below our 128M minimum), but you also have PHP 5.5.38, which is below our requirement as well.

As a matter of fact, I think that this version of PHP is also below WordPress minimum requirements, as of recently.

Therefore, can you update all of this before we resume on this? You can get all the information here:
https://wpml.org/home/minimum-requirements/
https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php

And as for changing the PHP version, you may need to consider reaching out your hosting support, even though this can be changed in cPanel as well. I suggest switching to the latest PHP version there is, such as 7.3 (if available on your hosting package).

Regards,
Bruno Kos

September 11, 2019 at 1:19 pm #4553605

Claudio Prandoni

Thank you! We updated PHP to 7.2 (the latest version available on our server) and it works fine again.