Error after uploading latest snapshop

Found a bug? Tell us!!
Post Reply
User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Error after uploading latest snapshop

Post by Don Chambers » Wed Apr 03, 2019 11:18 pm

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?

User avatar
yellowled
Regular
Posts: 6994
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Error after uploading latest snapshop

Post by yellowled » Thu Apr 04, 2019 3:26 pm

Don Chambers wrote:
Wed Apr 03, 2019 11:18 pm
Thoughts?
I assume your PHP version might be of interest.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)


User avatar
erAck
Regular
Posts: 83
Joined: Mon Feb 16, 2015 2:20 am

Re: Error after uploading latest snapshop

Post by erAck » Fri Apr 05, 2019 12:16 am

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).

User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Error after uploading latest snapshop

Post by Don Chambers » Fri Apr 05, 2019 12:26 am

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.

User avatar
erAck
Regular
Posts: 83
Joined: Mon Feb 16, 2015 2:20 am

Re: Error after uploading latest snapshop

Post by erAck » Fri Apr 05, 2019 1:35 am

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.

User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Error after uploading latest snapshop

Post by Don Chambers » Fri Apr 05, 2019 2:52 pm

The newest I can upgrade to is 5.6, so I will do that.

User avatar
onli
Regular
Posts: 2203
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Error after uploading latest snapshop

Post by onli » Fri Apr 05, 2019 3:08 pm

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.

User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Error after uploading latest snapshop

Post by Don Chambers » Fri Apr 05, 2019 3:22 pm

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?

User avatar
onli
Regular
Posts: 2203
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Error after uploading latest snapshop

Post by onli » Sat Apr 06, 2019 12:46 am

This specific error, yes. Voku/simple-cache will still not work, but that might be okay as long as you deactivate the cache.

Post Reply