Page 1 of 3

php 8.0

Posted: Sat Aug 20, 2022 5:34 am
by rootnl2k
when will Serendipity become PHP 8.X compliant?

I tired Serendipity 2.4 beta 1

and found this in our web logs

2022/08/19 20:51:07 [error] 5900#389539: *2810913 FastCGI sent in stderr: "PHP m
essage: PHP Fatal error: Uncaught Error: Call to a member function getBody() on
null in /usr/local/www/nginx-dist/blog/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php:535
Stack trace:
#0 /usr/local/www/nginx-dist/blog/plugins/serendipity_event_spartacus/serendipit
y_event_spartacus.php(653): serendipity_event_spartacus->fetchfile('https://raw.
git...', '/usr/local/www/...', 43200, true)
#1 /usr/local/www/nginx-dist/blog/plugins/serendipity_event_spartacus/serendipit
y_event_spartacus.php(1164): serendipity_event_spartacus->fetchOnline('sidebar')
#2 /usr/local/www/nginx-dist/blog/plugins/serendipity_event_spartacus/serendipit
y_event_spartacus.php(1340): serendipity_event_spartacus->count_plugin_upgrades()
#3 /usr/local/www/nginx-dist/blog/include/plugin_api.inc.php(1188): serendipity_event_spartacus->event_hook('backend_plugins...', Object(serendipity_property_bag), NULL, NULL)
#4 /usr/local/www/nginx-dist/blog/include/admin/upgrader.inc.php(457): serendipity_plugin_api::hook_event('backend_plugins...', NULL)
#5 /usr/local/www/nginx-dist/blog/serendipity_admin.php(260): require('/usr/local/www/...')
#6 {main}
thrown in /usr/local/www/nginx-dist/blog/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 535" while reading response header from upstream, client: 185.25.35.13, server: *.nk.ca, request: "GET /blog/serendipity_admin.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "www.nk.ca"

Re: php 8.0

Posted: Tue Aug 23, 2022 11:36 pm
by onli
Hi. 2.4-beta1 is already supposed to be compatible with PHP 8.0. The error you show is about the request to raw.github (right?) not working. This could have several other causes, like the server not having IPv4, github being down or outgoing connections being blocked. Can you rule those out?

Re: php 8.0

Posted: Wed Aug 24, 2022 1:36 am
by rootnl2k
IPv4 working! URL to github is working and I doubt the connection is being blocked.

Re: php 8.0

Posted: Wed Aug 24, 2022 3:21 pm
by onli
Could you please try the alternative gitlab mirror anyway? You can set it in spartacus' settings.

Re: php 8.0

Posted: Wed Aug 24, 2022 4:08 pm
by rootnl2k
1) tell me where to set the alternative gitlab mirror

2) Tell me what to test in php 8 in a CLI ?

Re: php 8.0

Posted: Wed Aug 24, 2022 4:10 pm
by onli
You can change that in the plugins menu. Find the spartacus plugin in the list of event plugins. Open its settings, via the gear icon. There will be two dropdown settings currently owing Github as value, one for the XML files, one for the data files itself. Both you can change to Gitlab.

I have no idea what you could test in the CLI for this situation.

Re: php 8.0

Posted: Wed Aug 24, 2022 10:38 pm
by rootnl2k
Right now I am back to 7.4 (I want to dith this ASAP). What test could be used?

Re: php 8.0

Posted: Wed Aug 24, 2022 11:12 pm
by onli
I doubt that you can test this without moving the blog over to PHP 8.0. If you have the time, recreate it in a test installation with the exact plugins you use. Then you might be able to test this more properly.

The error message only says that the fetch via spartacus did not work, but that certainly does work on PHP 8.0 in general, so I think it has to be something server or setup specific :/

Re: php 8.0

Posted: Wed Aug 24, 2022 11:36 pm
by rootnl2k
Too bad a debug cannot be run

Re: php 8.0

Posted: Wed Aug 31, 2022 3:28 pm
by rootnl2k
I wonder if the problem of not reaching github can be tested in php 7.4 ?

Re: php 8.0

Posted: Wed Aug 31, 2022 4:43 pm
by onli
Yes, sure. Spartacus in that version also already used Github. Check its configuration, then open the plugin update screen.

Re: php 8.0

Posted: Sat Sep 24, 2022 3:51 pm
by rootnl2k
https://www.nk.ca/blog/serendipity_admi ... d1cd35894f gives

The URL https://raw.github.com/s9y/additional_p ... bar_en.xml (IP 185.199.108.133) could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.


When I check from the server in question https://raw.github.com/s9y/additional_p ... bar_en.xml , the page appears.

Where do I look for what is causing this error?

Re: php 8.0

Posted: Tue Sep 27, 2022 3:40 pm
by onli
That would be your hoster, they probably block this connection and can open it for you. Alternatively you can try the gitlab mirror, in the spartacus settings.

Re: php 8.0

Posted: Tue Sep 27, 2022 11:51 pm
by rootnl2k
I am the host. I am using nginx . I do not recall blocking sparticus

Re: php 8.0

Posted: Tue Sep 27, 2022 11:56 pm
by rootnl2k
I would like to know where the sparticus settings are.