Board index General discussions php7

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
tonnie
Regular
 
Posts: 13
Joined: Tue Apr 08, 2008 10:38 pm
Location: netherlands

Postby tonnie » Fri Nov 06, 2015 8:29 pm

Hi,

I have searched for it, but cant find anything about support for php7

Does any one know if it runs under php7??

I need to know because i have to move my sites to a server that runs php7

Thanks
Vision2form webdesign & seo

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

Postby onli » Sat Nov 07, 2015 12:44 pm

I don't know of anyone having tested that. I expect it to not work at all, the evaluation changes alone (see https://www.digitalocean.com/company/bl ... for-php-7/) should make s9y and the bundled libs fail all over the place.

Hope I'm wrong. That does not look like something that is fixable without crazy maintenance work.

User avatar
garvinhicking
Core Developer
 
Posts: 29955
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Mon Nov 09, 2015 5:17 pm

Hi!

As for some bundled libraries, I'm afraid that could happen, too. But there I'm optimistic to be able to update to recent versions. As for the s9y core code, I do think we shouldn't have too many issues.

Having said that - I haven't tested it yet either, but it's on my list of things to try :)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Timbalu
Regular
 
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Fri Feb 12, 2016 11:23 am

I haven't tested it either yet, but I fell over PHP list() changes that could hit us on some places, I think.
(I just needed a place to note that somewhere to not forget about it.)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://github.com/ophian

elguenny
 
Posts: 3
Joined: Mon Feb 15, 2016 8:26 pm

Postby elguenny » Mon Feb 15, 2016 8:42 pm

I made a test yesterday, the JS library couldn't be loaded after switching to PHP 7:

The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open http://www.preciseassemblies.com/index. ... _editor.js manually in your browser and check for error messages.


The details are

<script>
if(typeof errorHandlerCreateDOM == "function") {
var fragment = window.top.errorHandlerCreateDOM("Error redirect: == SERENDIPITY ERROR == <p>Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor in /home/www/blog/bundled-libs/Cache/Lite.php on line 29</p>");
document.body.insertBefore(fragment, document.body.childNodes[0]);
}
</script>
<noscript> == SERENDIPITY ERROR == <p>Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor in /home/www/blog/bundled-libs/Cache/Lite.php on line 29</p></noscript>
/* Dynamically fetched templates/2k11/admin/serendipity_editor.js.tpl on 2016-02-14 20:33, called from: include/plugin_api.inc.php:external_plugin */
/* $Id$ */
/*
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
*/

User avatar
Timbalu
Regular
 
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Feb 15, 2016 9:19 pm

Please unzip into /serendpity/bundled-libs directory, which overwrites the "Pear" /Cache dir
Cache.zip
Cache_lite update
(11.31 KiB) Downloaded 45 times

Maybe this just helps to get around the constructor error ... but may just loop into some other next error with PHP7... :)

Please tell us if that works well with cache lite. Pear dependencies should fit.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://github.com/ophian

elguenny
 
Posts: 3
Joined: Mon Feb 15, 2016 8:26 pm

Postby elguenny » Mon Feb 15, 2016 10:38 pm

Didn't help ;)

<script>
if(typeof errorHandlerCreateDOM == "function") {
var fragment = window.top.errorHandlerCreateDOM("Error redirect: == SERENDIPITY ERROR == <p>Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor in /home/www/blog/bundled-libs/Cache/Lite.php on line 29</p>");
document.body.insertBefore(fragment, document.body.childNodes[0]);
}
</script>
<noscript> == SERENDIPITY ERROR == <p>Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor in /home/www/blog/bundled-libs/Cache/Lite.php on line 29</p></noscript>
/* Dynamically fetched templates/2k11/admin/serendipity_editor.js.tpl on 2016-02-15 21:37, called from: include/plugin_api.inc.php:external_plugin */
/* $Id$ */
/*
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
*/

User avatar
Timbalu
Regular
 
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Tue Feb 16, 2016 11:14 am

Are you sure it replaced the correct file? Check the file dates. This is the last current version from PEAR.

They still seem to use the old PHP4 constructors, with the method name == class name, eg
Code: Select all
    function Cache_Lite($options = array(NULL))

which - I think - should now be
Code: Select all
   public function __construct($options = array(NULL))

I can't test this yet. Analog in the other Cache_lite files... Give it a try.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://github.com/ophian

elguenny
 
Posts: 3
Joined: Mon Feb 15, 2016 8:26 pm

Postby elguenny » Tue Feb 16, 2016 8:24 pm

The version 1.7.16 is from 2014 and seems outdated. I changed only one line in the lite.php file and the error seems to be gone.

function Cache_Lite($options = array(NULL))

to
function __construct($options = array(NULL))


When the backend works well, all is loaded correctly?
Are there other ways to test it?

User avatar
Timbalu
Regular
 
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Wed Feb 17, 2016 11:02 am

elguenny wrote:When the backend works well, all is loaded correctly?

I assume so, yes.
We have some plugins making use of it I think: imagesidebar and linklist sidebar, [...] .

elguenny wrote:Are there other ways to test it?

https://github.com/pear/Cache_Lite/tree/master/tests
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://github.com/ophian



Return to General discussions

Who is online

Users browsing this forum: No registered users and 2 guests