Problem mit Spartacus und XML von Github

Hier können Probleme und alles andere in Deutscher Sprache gelöst werden.
Post Reply
MarioH
Regular
Posts: 238
Joined: Mon Jul 20, 2009 10:53 pm
Contact:

Problem mit Spartacus und XML von Github

Post by MarioH »

Hallo,

ich habe da ein merkwürdiges Problem. Ich habe auf einem Server zwei Blogs und möchte, dass das Spartacus-Plugin sich XML und Dateien von Github holt. Bei einem Blog funktioniert das, beim anderen kommt nach der Umstellung im Plugin folgende Meldung, wenn ich neue Plugins installieren möchte oder nach Updates suche:

The URL https://raw.github.com/s9y/additional_p ... bar_en.xml (IP 151.101.60.133) could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Fatal error: Call to a member function getStatus() on a non-object in /var/www/abouts9y.org/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 436

Beide Blogs laufen mit der 2.1beta, der Blog, bei dem es nicht funktioniert, ist auf HTTPS. Kann da das Problem liegen?

Gruß
Mario
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Problem mit Spartacus und XML von Github

Post by onli »

Ah, ja. Lese gerade deinen Beitrag, denke: hm, keine Idee, gehe in meinen Blog um das Social-Plugin zu installieren und kriege exakt die gleiche Fehlermeldung. Ebenfalls auf beta1 und https (wobei es an https daran eigentlich nicht liegen sollte). Ich schau mir das mal an…
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Problem mit Spartacus und XML von Github

Post by onli »

Ein bisschen gedebugged, das ist die richtige Fehlermeldung:

Code: Select all

HTTP_Request2_ConnectionException: Unable to connect to tls://raw.githubusercontent.com:443. Error: stream_socket_client(): unable to connect to tls://raw.githubusercontent.com:443 (Unknown error) stream_socket_client(): Failed to enable crypto stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/bundled-libs/HTTP/Request2/Adapter/Socket.php on line 332
Das scheint also an der Serverkonfiguration/PHP/Openssl zu liegen.
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Problem mit Spartacus und XML von Github

Post by onli »

Das ist der bug, und dies das Problem:
For versions of PHP below 5.6 the only solution is to provide 'ssl_cafile' and / or 'ssl_capath' for every request if using Socket adapter. Curl adapter will or will not be able to use the defaults depending on distribution, additionally you can set curl.cainfo parameter in php.ini on PHP 5.3.7+ (it contains the default value for CURLOPT_CAINFO setting to which 'ssl_cafile' setting is mapped).
Tatsächlich ist mein Blog auf PHP 5.5.9. Mario, deiner auch?

Wir müssen also entweder für alte PHP-Versionen die Überprüfung deaktivieren oder eine ssl_cafile mitliefern. Garvin, was ist dir lieber?

PS: Wenn ich auf den Code gucke sehe ich ein weiteres Problem: Der Download wird scheitern, wenn der Statuscode eine Weiterleitung anzeigt. Tatsächlich ist aber die url in Spartacus für github https://raw.github.com/…, was auf https://raw.githubusercontent.com/… weiterleitet. Generell ist es unsinnig, Weiterleitungen zu folgen, aber dann später deswegen einen Fehler zu werfen. Ich werde den Code da anpassen müssen, unabhängig vom SSL-Problem.
MarioH
Regular
Posts: 238
Joined: Mon Jul 20, 2009 10:53 pm
Contact:

Re: Problem mit Spartacus und XML von Github

Post by MarioH »

PHP 5.4.45
Ja, ich weiß, das ist deprecated, ist aber noch Standard auf Wheezy. :wink:
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Problem mit Spartacus und XML von Github

Post by onli »

Ich habe soeben einen Patch hochgeladen: https://github.com/s9y/Serendipity/comm ... 63c51584bd. Er deaktiviert die Zertifikatprüfung bei alten PHP-Versionen, was unschön ist, aber die einfachere Lösung (manuell eine cafile mitzuliefern ist ebenfalls unschön).

In meinen Tests schien die Weiterleitung kein Problem zu sein, eventuell kommt da am Ende doch ein 200 an. Aber das wäre ansonsten auch nicht kompliziert zu reparieren.

Die einfachste Lösung für dich wäre jetzt, deinen Blog auf die aktuelle github-Version zu aktualisieren.

Ach so: Danke fürs Melden des Bugs!
MarioH
Regular
Posts: 238
Joined: Mon Jul 20, 2009 10:53 pm
Contact:

Re: Problem mit Spartacus und XML von Github

Post by MarioH »

Mit der Installation von Github klappt es jetzt.

Danke für die schnelle Lösung. :)
Post Reply