PHP 7.3 and above

Discussion corner for Developers of Serendipity.
Post Reply
thatsme
Regular
Posts: 14
Joined: Sat Jun 12, 2010 7:50 pm

PHP 7.3 and above

Post by thatsme » Thu Dec 03, 2020 7:06 pm

Hello there
I've got a warning from my provider that PHP 7.2 will no longer be supported starting from 3/1/2021, so I tried to migrate my site to 7.4 (there were 7.3 and 8.0 also available). To make the story short, neither of them works correctly. The frame showed up but all content disappeared (in 7.4 and 8, in 7.3 I've got only long list of issues).
Do you think it possible to make it work without returning to 7.2? I would appreciate any help.
Thank you and have a great day
http://predvidenie.com
Last edited by thatsme on Sat Dec 05, 2020 8:52 am, edited 2 times in total.

User avatar
erAck
Regular
Posts: 168
Joined: Mon Feb 16, 2015 1:20 am

Re: PHP 7.3 and above

Post by erAck » Thu Dec 03, 2020 11:27 pm

S9y 2.3.5 on PHP 7.3 works for me.

Seeing your long list of Deprecated messages you may be running a non-production version or have set $serendipity['production']='debug' or something, otherwise it should be configured to

error_reporting(E_ALL & ~(E_NOTICE|E_STRICT|E_DEPRECATED));

which excludes Deprecated messages.

Check your serendipity_config_local.inc.php, if $serendipity['production'] is set there then remove it, otherwise try to set error_reporting() as mentioned and hope it overrides whatever set it.

thatsme
Regular
Posts: 14
Joined: Sat Jun 12, 2010 7:50 pm

Re: PHP 7.3 and above

Post by thatsme » Fri Dec 04, 2020 8:26 am

Thank you for respond, erAck
I did what you said, added the line to confic.local.inc.php and now I can see the frame as in the latter versions.
But I still have no content displayed.
I tried to edit some entry from admin page and it returned to me this thing -
== SERENDIPITY ERROR ==
Warning: preg_replace_callback(): Compilation failed: invalid range in character class at offset 330 in /homepages/42/d330154832/htdocs/serendipity/plugins/serendipity_event_textile/lib2/classTextile.php on line 1318.
For more details set $serendipity['production'] = 'debug' in serendipity_config_local.inc.php to receive a stack-trace.
So, any idea on what I should do now?
Thank you

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

Re: PHP 7.3 and above

Post by onli » Tue Dec 15, 2020 9:13 pm

Hi thatsme, to give you a chance to solve this: This is likely the textile plugin not being compatible with your PHP version. You can try three things:

1. Make sure you have the newest version of that plugin installed.
2. It looks like you use textile version 2, that is configureable in the textile plugin. Try setting it to 3, that might be better compatible. Though I do not know whether those textile versions support the same type of textile markup.
3. If that does not help, we might have to update the textile parser being used in that plugin. You could download it from https://github.com/textile/php-textile/releases. The file that seems to be incompatible is version 2.4.3 of that textile, while 2.5.5 is available on that github page. You could try just exchanging the files under plugins/serendipity_event_textile/lib2/

thatsme
Regular
Posts: 14
Joined: Sat Jun 12, 2010 7:50 pm

Re: PHP 7.3 and above

Post by thatsme » Fri Dec 18, 2020 11:33 pm

YESSS!!!
I've changed ver.2 for 3 and everything begun to sound! (well, almost).
Thank you my friend, I don't have enough words to express my appreciation in full. It running well in PHP7.3 and 7.4, but in 8.0 they returned a list of issues, but I don't care now since 7.4 will be good for at least another two years.
The only flaw that I noticed was in the comments, it gave something like
"Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in /homepages/42/d330154832/htdocs/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php on line 249"

at the beginning of each comment, but I think I can live with it.
Thank you again, dear "onli", you are exceptionally knowledgeable helper, I've noticed that. :)
Last edited by thatsme on Fri Dec 18, 2020 11:56 pm, edited 2 times in total.

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

Re: PHP 7.3 and above

Post by onli » Fri Dec 18, 2020 11:47 pm

We will get 8.0 to run before it's necessary to use it. 8.0 changed a lot, so it's no surprise s9y is not there yet, but there is time :)

I'm happy the change worked!
"Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in /homepages/42/d330154832/htdocs/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php on line 249"
That's something we should change in the next version. But I'm not sure yet whether we can just remove the encoding.

It should be possible to hide that deprecation warning though, via your php.ini, if you have access to that? Something like adding "& ~E_DEPRECATED" to "error_reporting = E_ALL", if that is what is set in there now.

Post Reply