Page 1 of 1

Error after uploading latest snapshop

Posted: Wed Apr 03, 2019 11:18 pm
by Don Chambers
Hey guys! Its been awhile since I looked at the lastest snapshot, so I uploaded it to the Cleanblog demo site and am now getting the following error:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /PATH/cleanblog/include/functions.inc.php on line 1385
Thoughts?

Re: Error after uploading latest snapshop

Posted: Thu Apr 04, 2019 3:26 pm
by yellowled
Don Chambers wrote:
Wed Apr 03, 2019 11:18 pm
Thoughts?
I assume your PHP version might be of interest.

YL

Re: Error after uploading latest snapshop

Posted: Thu Apr 04, 2019 4:11 pm
by Don Chambers

Re: Error after uploading latest snapshop

Posted: Fri Apr 05, 2019 12:16 am
by erAck
Ugh.. 5.4.19 is more than five years old (Aug-2013), no security updates applied for two years (up to 5.4.45 in Sep-2015), end of life since then. Really, do yourself a favour and upgrade (better hosting providers offer different versions to choose from), PHP 7.2 (and 7.3 anyway) might be too fresh for s9y, but PHP 7.1 (7.1.28 current latest) works fine with s9y 2.1.4 and most other software meanwhile, but at least use PHP 5.6 with its latest security updates (5.6.40 current).

Re: Error after uploading latest snapshop

Posted: Fri Apr 05, 2019 12:26 am
by Don Chambers
Thanks. I am willing to upgrade php, but I have multiple s9y installations behaving just fine with php 5.4.

I have s9y installed on multiple domains, and in some cases, installed in multiple folders, such as:

http://www.optional-necessity.com/
http://www.optional-necessity.com/demo/kinetic/
http://www.optional-necessity.com/demo/timeline/
http://www.optional-necessity.com/demo/cleanblog/

And there are others... Installing a more recent php version will affect all of these s9y installations for a specific domain. The only one I am having difficulty with is the one I just installed the latest s9y snapshot to, so I would like to discover the underlying problem to that specific installation prior to changing php versions unless my problem is well documented to exist as a result of php 5.4.

Re: Error after uploading latest snapshop

Posted: Fri Apr 05, 2019 1:35 am
by erAck
I'm quite certain that at least some new code will require a newer PHP version. I doubt any coder would cater to a platform that's EOL since 4 years and care for its restrictions unless being paid a significant amount of money or comparable goods.

With using a completely outdated PHP version you're exposing yourself, your hoster and maybe even your users to unnecessary risks that can be easily avoided by upgrading to a supported newer version that s9y is known to run on.

Your setup with multiple instances and/or domains is no excuse.

Re: Error after uploading latest snapshop

Posted: Fri Apr 05, 2019 2:52 pm
by Don Chambers
The newest I can upgrade to is 5.6, so I will do that.

Re: Error after uploading latest snapshop

Posted: Fri Apr 05, 2019 3:08 pm
by onli
The current git master needs PHP 7.x. We merged dependencies that rely on PHP 7.

PHP 5.6 is a lot better than PHP 5.4, but you should not upgrade to a newer version than the current stable with that (2.1.4).

PHP is changing and changing fast, we can't keep bc compatibily like we did the last decade.

For the issue in question, that's the code there:

Code: Select all

 $cacheManager->addAdapter(
        \voku\cache\AdapterOpCache::class,
        static function () {
            global $serendipity;
            $cacheDir = $serendipity['serendipityPath'] . '/templates_c/simple_cache';
            return $cacheDir;
        }
    );
The error should be caused by https://www.php.net/manual/en/migration ... class-name, available since PHP 5.5. However, voku/simple-cache is one of the dependencies on PHP 7 we use now, so I'd expect this to die anyway sooner rather than later on PHP 5.

Re: Error after uploading latest snapshop

Posted: Fri Apr 05, 2019 3:22 pm
by Don Chambers
onli wrote:
Fri Apr 05, 2019 3:08 pm
The error should be caused by https://www.php.net/manual/en/migration ... class-name, available since PHP 5.5. However, voku/simple-cache is one of the dependencies on PHP 7 we use now, so I'd expect this to die anyway sooner rather than later on PHP 5.
Are you saying that you believe the error will go away with php > 5.5?

Re: Error after uploading latest snapshop

Posted: Sat Apr 06, 2019 12:46 am
by onli
This specific error, yes. Voku/simple-cache will still not work, but that might be okay as long as you deactivate the cache.