php 8.0

Found a bug? Tell us!!
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

php 8.0

Post 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"
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: php 8.0

Post 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?
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

IPv4 working! URL to github is working and I doubt the connection is being blocked.
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: php 8.0

Post by onli »

Could you please try the alternative gitlab mirror anyway? You can set it in spartacus' settings.
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

1) tell me where to set the alternative gitlab mirror

2) Tell me what to test in php 8 in a CLI ?
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: php 8.0

Post 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.
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

Right now I am back to 7.4 (I want to dith this ASAP). What test could be used?
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: php 8.0

Post 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 :/
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

Too bad a debug cannot be run
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

I wonder if the problem of not reaching github can be tested in php 7.4 ?
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: php 8.0

Post by onli »

Yes, sure. Spartacus in that version also already used Github. Check its configuration, then open the plugin update screen.
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post 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?
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: php 8.0

Post 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.
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

I am the host. I am using nginx . I do not recall blocking sparticus
rootnl2k
Regular
Posts: 50
Joined: Tue Jul 17, 2012 7:15 am

Re: php 8.0

Post by rootnl2k »

I would like to know where the sparticus settings are.
Post Reply